Compat-wireless and BackTrack
I recently bought TP-LINK TL-WN722n wi-fi usb dongle with atheros ar9271 chipset which is not currently supported by BackTrack. The drivers came up with the last compat-wireless realease (driver's name is ath9k_htc). So I downloaded compat-wireless-2010-03-28 but I'm having trouble installing them in BackTrack 4 final.
Here is the driver's page
What I did is:
1. Downloaded the firmware (ar9271.fw) and copied it in /lib/firmware/
2. Extracted compat-wireless and run "make" from its directory
Code:
root@bt:~/compat-wireless-2010-03-28# make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'
WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
is missing; modules will have no dependencies and modversions.
(...)
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/gpio.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/init.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/main.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/recv.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/xmit.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/virtual.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/rc.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/pci.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.o
/root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.c: In function ‘ath9k_cmn_rx_skb_preprocess’:
/root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.c:215: warning: ‘noise’ is deprecated (declared at /root/compat-wireless-2010-03-
28/include/net/mac80211.h:564)
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_hst.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/hif_usb.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/wmi.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_txrx.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_main.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_beacon.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_init.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/hw.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_def.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_4k.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_9287.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/calib.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ani.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/phy.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/btcoex.o
CC [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/mac.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.o
(...)
Building modules, stage 2.
CC /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.mod.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.ko
CC /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.mod.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
CC /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.mod.o
LD [M] /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
There seems to be an error in common.o af ath9k, but ath9k_htc seems OK.
Next I install the drivers
3. sudo make install
Code:
root@bt:~/compat-wireless-2010-03-28# sudo make install
(...)
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'
WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
is missing; modules will have no dependencies and modversions.
Building modules, stage 2.
MODPOST 86 modules
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 "INSTALL_MOD_DIR=updates" \
modules_install
(...)
INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k.ko
INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.ko
INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
(...)
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
Updating Ubuntu's initramfs for 2.6.31-wl under /boot/ ...
Cannot find /lib/modules/2.6.31-wl
Will now run update-grub to ensure grub will find the new initramfs ...
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found: /boot/grub/splash.xpm.gz
Found kernel: /boot/vmlinuz-2.6.30.9
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
Note: madwifi detected, we're going to disable it. If you would like to enable it later you can run:
sudo athenable madwifi
Running athenable ath5k...
Disabling ath_pci ... [OK] Module disabled:
/lib/modules/2.6.30.9/net/ath_pci.ko
depmod will prefer updates/ over kernel/ -- OK!
Currently detected wireless subsystem modules:
(...)
/lib/modules/2.6.30.9/updates/net/wireless/lib80211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/adm8211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ar9170/ar9170usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/at76c50x-usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
4. Unload currently running drivers.
Code:
root@bt:~/compat-wireless-2010-03-28# sudo make unload
5. Try to load the ath9k_htc module using modprobe
Code:
root@bt:~/compat-wireless-2010-03-28# modprobe ath9k_htc
nothing happens
Code:
root@bt:~/compat-wireless-2010-03-28# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
6. Try to load them using the inbuild load command
Code:
root@bt:~/compat-wireless-2010-03-28# sudo make load
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading ath9k...
Unloading ath...
FATAL: Module ath is in use.
Unloading mac80211...
FATAL: Module mac80211 is in use.
Unloading cfg80211...
FATAL: Module cfg80211 is in use.
Unloading rfcomm...
(...)
Module ath_pci not detected -- this is fine
ath5k loaded successfully
ath9k loaded successfully
Module bcm43xx not detected -- this is fine
Disabling wl ... [OK] Module disabled:
/lib/modules/2.6.30.9/kernel/net/wireless/wl.ko
FATAL: Error inserting b43 (/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko): Unknown symbol in module, or unknown parameter (see dmesg)
b43 loaded successfully
b43legacy loaded successfully
Starting bluetooth service..
Starting bluetooth: bluetoothd.
bluetooth is running.
At this point there are two wireless adapters (I have an in-built one on the laptop) but they seem to be duplicated and they are not working at all - could not find any networks
Code:
root@bt:~/compat-wireless-2010-03-28# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11abgn Mode:Managed Access Point: Not-Associated
Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
wlan1 IEEE 802.11abgn Mode:Managed Access Point: Not-Associated
Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
hwsim0 no wireless extensions.
pan0 no wireless extensions.
I don't have any idea what's wrong - please help - since I'm a linux newbie it could be somthing very obvious. I heard about kernel .conf file, installing kernel headers etc. but I have no idea what to do next. Thanx in advance...
Re: Compat-wireless and BackTrack
Try going to your compat wireless folder and running
I'm sure someone else will have better insight than me, but you might want to give that a whirl.
Re: Compat-wireless and BackTrack
instead of using modprobe, try unloading the drivers and rebooting
Code:
# sudo make unload
# reboot
Re: Compat-wireless and BackTrack
try this one:
1.
Code:
ln -s /usr/src/linux /lib/modules/2.6.30.9/build
2.reinstall
Code:
tar -xf /root/compat-wireless-2.6.32.3.tar.bz2
cd compat-wireless-2.6.32.3
make
make install
make unload
3use any notepad to open /etc/modprobe.d/blacklist ,add to blacklist
Code:
blacklist arusb_lnx
Re: Compat-wireless and BackTrack
Tried to reboot, tried /scripts/athenable, tried secowu's solution - nothing works.
When I load the driver and run dmesg afterwards its says
Code:
usb 2-5: firmware: requesting ar9271.fw
cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
usb 2-5: ath9k_htc: Firmware - ar9271.fw not found
ath9k_hif_usb: probe of 2-5:1.0 failed with error -22
usbcore: registered new interface driver ath9k_hif_usb
It seems to have troubles locating the firmware - ar9271.fw, which is in /lib/firmware. Strange. Ideas?
Re: Compat-wireless and BackTrack
Quote:
Originally Posted by
trismagis
Tried to reboot, tried /scripts/athenable, tried secowu's solution - nothing works.
When I load the driver and run dmesg afterwards its says
Code:
usb 2-5: firmware: requesting ar9271.fw
cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
usb 2-5: ath9k_htc: Firmware - ar9271.fw not found
ath9k_hif_usb: probe of 2-5:1.0 failed with error -22
usbcore: registered new interface driver ath9k_hif_usb
It seems to have troubles locating the firmware - ar9271.fw, which is in /lib/firmware. Strange. Ideas?
Similar problem with this one.Problem to locate ar9271.fw while I put it in both /lib/firmware and also /lib/firmware-2.6.30.9/ .
Re: Compat-wireless and BackTrack
Damn That's so crazy I was gonna buy that one too but I didn't find much support for it online so I ended up the the tl-wn821n and I really wanted to get that one so let me know if you get it to work because I still want to buy it.
P.S if you get it to work with the injection then please let me know. And if its possible please post up how you did it thanks
Re: Compat-wireless and BackTrack
I can't build compat-wireless-2010-04-06 or compat-wireless-2010-04-05 - it gives me Error 2 on both "make" and "install"
make:
Code:
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/caps.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/initvals.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/eeprom.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/gpio.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/desc.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/dma.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/qcu.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/pcu.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/phy.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/reset.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/attach.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/base.o
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/base.c: In function вЂath5k_tasklet_rx’:
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/base.c:2060: warning: вЂnoise’ is deprecated (declared at /root/compat-wireless-2010-04-06/include/net/mac80211.h:564)
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/base.c:2061: warning: вЂnoise’ is deprecated (declared at /root/compat-wireless-2010-04-06/include/net/mac80211.h:564)
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/led.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/rfkill.o
LD [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath5k/ath5k.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/beacon.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/gpio.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/init.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/main.o
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/recv.o
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/recv.c: In function вЂath_rx_tasklet’:
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/recv.c:572: warning: passing argument 2 of вЂath_debug_stat_rx’ from incompatible pointer type
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.o
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.c: In function вЂath_tx_complete_buf’:
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.c:1880: error: too many arguments to function вЂath_debug_stat_tx’
make[5]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.o] Error 1
make[4]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath] Error 2
make[2]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2010-04-06] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
make: *** [modules] Error 2
Install:
Code:
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-04-06 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'
WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.o
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.c: In function вЂath_tx_complete_buf’:
/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.c:1880: error: too many arguments to function вЂath_debug_stat_tx’
make[5]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k/xmit.o] Error 1
make[4]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless/ath] Error 2
make[2]: *** [/root/compat-wireless-2010-04-06/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2010-04-06] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
make: *** [modules] Error 2
@secowu
Please, post here theversion of ar9271.fw firmware file you use and tell us exactly where you put it. Do you use updated BackTrack or not? It would be best if you could a step-by-step guide how did you do it :) - it will be most appreciated. Thank you very much in advance.