photo lineviral_1.png

Tp-Link Tl-Wdn3200 N600 Wireless Dual Ring Usb Adapter Inwards Linux

ve been trying to travel into piece of work inwards Kali Linux which is a Debian derivative TP-Link TL-WDN3200 N600 Wireless Dual Band USB Adapter inwards LinuxI’ve got this TP-Link TL-WDN3200 N600 Wireless Dual Band USB Adapter in addition to I’ve been trying to travel into piece of work inwards Kali Linux which is a Debian derivative. I managed to detect the Linux driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2 from http://www.mediatek.com/. The instructions were really clear merely when I tried to compile I received an compile fault “make: *** /lib/modules/3.7-trunk-amd64/build: No such file or directory. Stop.“. Following is how to re-produce in addition to create this error.


Plug-in the USB Adapter


Issue the next command which lists all plugged inwards USB devices.


root@oracle: # lsusb 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 beginning hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 beginning hub
Bus 001 Device 003: ID 148f:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
Bus 002 Device 003: ID 148f:5572 Ralink Technology, Corp.
root@oracle: #

Download driver in addition to unpack it.


root@oracle: # tar xvf DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2
root@oracle: # cd Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/
root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# ls
chips iwpriv_usage.txt rate_ctrl RT2870STA.dat tools
common Makefile README_STA_usb sta
include bone RT2870STACard.dat sta_ate_iwpriv_usage.txt

Modify makefile


In Makefile


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# leafpad Makefile

set the "MODE = STA" inwards Makefile in addition to chose the TARGET to Linux yesteryear laid "TARGET = LINUX".

You tin alter to a greater extent than to come across your need.


Modify config.mk file


In os/linux/config.mk


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# leafpad os/linux/config.mk

2 Options:


** Build for beingness controlled yesteryear NetworkManager or wpa_supplicant wext functions

Please laid ‘HAS_WPA_SUPPLICANT=y’ in addition to ‘HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y’.

=> #>cd wpa_supplicant-x.x

=> #>./wpa_supplicant -Dwext -ira0 -c wpa_supplicant.conf -d

** Build for beingness controlled yesteryear WpaSupplicant alongside Ralink Driver

Please laid ‘HAS_WPA_SUPPLICANT=y’ in addition to ‘HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n’.

=> #>cd wpa_supplicant-0.5.7

=> #>./wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d


In my case, I guide y in addition to y for both.


Complile code


Now lets endeavor to compile using make command.


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# make
make -C tools
make[1]: Entering directory `/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools/bin2h
cp -f os/linux/Makefile.6 /root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/Makefile
make -C /lib/modules/3.7-trunk-amd64/build SUBDIRS=/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux modules
make: *** /lib/modules/3.7-trunk-amd64/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2

This is where I got the error:


make: *** /lib/modules/3.7-trunk-amd64/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2

Determine headers


To create this fault nosotros bespeak to install right headers every bit yous tin reckon the compiler is looking into the next directory /lib/modules/3.7-trunk-amd64/build

Following command volition listing available headers


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# aptitude search `uname -r`
p linux-headers-3.7-trunk-amd64 - Header files for Linux 3.7-trunk-amd64
i H5N1 linux-image-3.7-trunk-amd64 - Linux 3.7 for 64-bit PCs
p linux-image-3.7-trunk-amd64-dbg - Debugging symbols for Linux 3.7-trunk-amd64
v linux-latest-modules-3.7-trunk-amd64 -
v linux-modules-3.7-trunk-amd64 -
p xen-linux-system-3.7-trunk-amd64 - Xen organization alongside Linux 3.7 on 64-bit PCs (meta-package)

Now let’s install the right headers using the next command


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
Reading parcel lists... Done
Building dependency tree
Reading terra firma information... Done
The next extra packages volition last installed:
linux-headers-3.7-trunk-amd64 linux-headers-3.7-trunk-common linux-kbuild-3.7
The next NEW packages volition last installed:
linux-headers-3.7-trunk-amd64 linux-headers-3.7-trunk-common linux-headers-amd64 linux-kbuild-3.7
0 upgraded, iv newly installed, 0 to take in addition to 0 non upgraded.
Need to larn 4,671 kB of archives.
After this operation, 30.0 MB of additional disk infinite volition last used.
Do yous desire to maintain [Y/n]? Y
.
.
.
.
.
<truncated>
.
.
.

Setting upward linux-headers-3.7-trunk-common (3.7.2-0+kali8) ...
Setting upward linux-kbuild-3.7 (3.7.1-1 experimental.1+kali2) ...
Setting upward linux-headers-3.7-trunk-amd64 (3.7.2-0+kali8) ...
Setting upward linux-headers-amd64 (3.7+46+kali1) ...

That looks good. Now nosotros should last able to compile the code


Compile code – Take 2


Issue make command to complile source codes


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# make
make -C tools
make[1]: Entering directory `/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools/bin2h
cp -f os/linux/Makefile.6 /root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/Makefile
make -C /lib/modules/3.7-trunk-amd64/build SUBDIRS=/root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.7-trunk-amd64'
.
.
.
.
.
<truncated>
.
.
.
.
.
make[1]: Leaving directory `/usr/src/linux-headers-3.7-trunk-amd64'
cp -f /root/Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/rt5572sta.ko /tftpboot
root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022#

Thats looks better. Now nosotros tin endeavor to truly job the driver.


Copy drivers


Copy the driver to /etc/Wireless/RT2870STA


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# mkdir -p /etc/Wireless/RT2870STA/
root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# cp RT2870STA.dat /etc/Wireless/RT2870STA/

Load driver module


Plugin the USB Adapter immediately if yous haven’t already in addition to charge driver


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# insmod os/linux/rt5572sta.ko

Set interface up


Set interface upward in addition to yous powerfulness bespeak to restart Network Manager


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# ifconfig ra0 inet up
root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# service network-manager restart

Unload driver module


To unload driver, unplug the USB Adapter and


root@oracle: /Desktop/DPO_RT5572_LinuxSTA_2.6.1.3_20121022# rmmod rt2870sta

That makes TP-Link TL-WDN3200 N600 Wireless Dual Band USB Adapter piece of work inwards linux.


Thanks for reading.


Buat lebih berguna, kongsi:
close