Alfa AWUS036NHR is Backtrack 5/Linux compatible

August 16, 2011

Alfa’s AWUS036NHR is Linux compatible. It also works with Backtrack 5 (BT5), but is not plug and play. Driver installation is needed (note: at this time it does not appear to be possible to get AWUS036NHR into monitor mode AND have 802.11n capabilities at the same time, see Alfa’s AWUS036NH or Rokland’s n3 for 802.11n and monitor mode capability in Backtrack 5).



The following is a quick-install guide for Linux users.
This should allow you to use your AWUS036NHR for Wi-Fi access in most recent Linux distributions running kernel 2.6.38, but as noted, monitor mode does not appear to be supported by this driver. Further down we have a link to a driver that is reported to allow you to use AWUS036NHR in monitor mode, but the corresponding web page notes the device will only have 802.11g functionality.

To install your Realtek RTL8188RU based AWUS036NHR in Linux, first download the driver here. The following steps were taken on an HP laptop running Backtrack 5, but the steps should be similar for other recent Linux distros.

*If you are not able to unzip the driver download file in Linux, you will need to download the file to a Windows computer to unzip and then copy the contents to your Linux computer via flash drive or another method.

1. When you have the files extracted on your Linux machine, open a terminal window and navigate to the location of the drivers.
2. Type ./install.sh to install the driver package
3. If installation completes successfully, then you can connect the Alfa adapter to the computer and open “Wicd Network Manager” from the Internet menu to connect to networks. Inside Wicd, click Preferences and change the network device to the AWUS036NHR adapter. If you are not sure of the device name, in a terminal window type “iwconfig” without quotes and it will list it there. Commonly the device will be called wlan0, wlan1, or wlan2 depending on whether you have other wireless cards installed on the computer.
4. If you receive a makefile error about “no rule to make target modules”, you may need to prepare kernel headers. As root, at the command line run these commands (you will need to have Internet access on the computer already):

prepare-kernel-sources

cd /usr/src/linux

cp -rf include/generated/* include/linux/

5. Upon completion, repeat step number 2 above to complete driver installation. Then connect the adapter to the computer and proceed to step 3.

URTWN Driver:

There is a driver called urtwn which specifies compatibility with RTL8188RU chipset-based devices, and allows for them to be put into monitor mode. The documentation for the driver explains that 802.11n functionality is not supported, so RTL8188RU devices will only operate in B/G mode. Rokland has not yet tried to use this driver with AWUS036NHR and is not able to offer installation assistance or support. You can visit this site for download information and more details:

http://resin.csoft.net/cgi-bin/man.cgi?section=4&topic=urtwn


Comments

pilot

pilot said:

BT5-R1 FAIL .
-———————-

./install

make1: Entering directory `/lib/modules/2.6.39.4/build’
make1: * No rule to make target `modules’. Stop.
make1: Leaving directory `/lib/modules/2.6.39.4/build’
make: *
[modules] Error 2
Compile make driver error: 2, Please check error Mesg
-————————

prepare-kernel-sources etc. do not help :(

Nusselt

Nusselt said:

Error for me! Some help?

make2: * [/root/Desktop/RTL8192CU_8188CUS_8188CE-VAU_linux_v3.0.2164.20110715/driver/rtl8192_8188CU_linux_v3.0.2164.20110715/core/rtw_cmd.o] Error 1
make1: *
module_/root/Desktop/RTL8192CU_8188CUS_8188CE-VAU_linux_v3.0.2164.20110715/driver/rtl8192_8188CU_linuxv3.0.2164.20110715] Error 2
make1: Leaving directory `/usr/src/linux-source-2.6.39.4’
make: * [modules] Error 2
Compile make driver error: 2, Please check error Mesg

mohab

mohab said:

it doesn’t work and the same error please help us

Jason

Jason said:

See step 4 "If you receive a makefile error about “no rule to make target modules”…

This resolved the same issue for us on our install. Be sure to run all of the commands in the step. If you still get the error it does not appear kernel headers are installing. You will need to be connected to the Internet in another manner (such as Ethernet cable) to complete step 4

mohab

mohab said:

I am already connected to the internet but the same problem even after doing step 4

jim

jim said:

Do you plan to add more support for the AWUS036NHR in the near future? i have 4 of these sitting on my desk and i would really like to use them plug and play with BT5.

Whitecoyote

Whitecoyote said:

Installing driver for ALFA AWUS036NHR
__________________________________________________________________________________________

The NHR driver worked just nice on my mac os x 10.7 64bits (and the 64-bit compatibility is one of the main reasons I chose the NHR and not the AWUS036), but I had some trouble installing it on my BT5 virtualized by VMware 3.0.0, outputing some errors while trying to compile (“make” errors) the driver «linux/smp_lock.h : no such file or directory»

Seems that these file no longer exists and linux/sched.h has to be used instead (source : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619952).

In order to do that, follox this instructions :

copy the folder RTL8192CU_8188CUS_8188CE-VAU_linux_v3.0.2164.20110715 from the driver CD to your desktop

In terminal :

cd /root/Desktop/RTL8192CU_8188CUS_8188CE-VAU_linux_v3.0.2164.20110715
bunzip /driver/rtl8192_8188CU_linux_v3.0.2164.20110715.tar.gz
tar -xf /driver/rtl8192_8188CU_linux_v3.0.2164.20110715.tar

nano /driver/rtl8192_8188CU_linux_v3.0.2164.20110715/include/odsep_service.h

Look for the include of <linux/smp_lock.h> and replace it by <linux/sched.h>

nano /driver/rtl8192_8188CU_linux_v3.0.2164.20110715/include/rtw_io.h

Look for the include of <linux/smp_lock.h> and replace it by <linux/sched.h>

nano install.sh

Remove line 9 «tar zxvf $Drvfoulder»

chmod 755 install.sh
./install.sh

USING THE DONGLE : FAIL
_________________________________________________________________________________________

I was able to set wlan0 up and get a successful iwlist wlan0 scan but here’s my new problem, I can’t get the dongle detected by airmon-ng, and I’m afraid I won’t be able to make it work with all the aircrack apps that are not compatible which the rtl8192cu chipset (correct me if I’m wrong).

I’m still searching the web, but the only solution that occurred to me was to patch the air crack apps. So being a bit lazy, I’m seriously considering to change my AWUS036NHR for a AWUS036, famous for his BT compatibility.

I would be grateful if anybody has a clue…

metin

metin said:

iwconfig yazdigimda ise :
iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11abgn ESSID:off/any
Mode:Managed Frequency:2.462 GHz Access Point: Not-Associated
Tx-Power=off
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

wlan1 IEEE 802.11bg ESSID:“ethem” Nickname:“<WIFI@REALTEK>”
Mode:Managed Frequency:2.462 GHz Access Point: 00:1C:A8:99:3F:8C
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=83/100 Signal level=83/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

mon0 IEEE 802.11abgn Mode:Monitor Tx-Power=off
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
mon0 hep me ?

Mu

Mu said:

I tried this and received the following error:
Compile make driver error: 2, Please check error Mesg

This is using Backtrack 5 (BT5 Backtrack5) 64 bit.

After looking up top in the command line, you find that the error was due to:

“linux/smp_lock.h not found” error

If you see that when you try to run the install.h (bash install.sh) you need to edit the following two files in the following archive:

driver/rtl8192_8188CU_linux_v3.1.2590.20110922.tar.gz

file 1: include/osdep_service.h
(line 49) linux/smp_lock.h to linux/smp.h

file 2: include/rtw_io.h
(line 36) linux/smp_lock.h to linux/smp.h

These files are located in:
“RTL8192CU_8188CUS_8188CE-VAU_linux_v3.0.2164.20110715/driver/rtl8192_8188CU_linux_v3.0.2164.20110715/include”

If you run the install.sh immediately you will see the same error. What ends up happening is that the files that you just corrected will get overwritten with the tar.gz archive, so what you did was pointless. To resolve this I ended up deleting the tar.gz file (rtl8192_8188CU_linux_v3.1.2590.20110922.tar.gz) so that it won’t re-extract the files and overwrite your corrections.

When you run the install.sh file, it will install successfully.

However… I still have an issue where this adapter will not obtain and IP address in wicd network manager. I will repost if i solve this. If anyone

Once you delete that tar.gz file and the edits have been made, you can run the install.sh file and it will install successfully.

hafiz

hafiz said:

Hi Pilot,

Navigate to folder /lib/modules/2.6.39.4/build,
there is folder name linux in it, copy all files and folders in linux folder and put in the build folder, then try to compile it again, hope that’s help

SmithO

SmithO said:

I tried editing the files but it says it’s in “read mode” & won’t let me me change the files. What do I do??

Elliott Rose

Elliott Rose said:

I wonder if the awus036nhr is working fully with Backtrack 5R2?

lukewalker

lukewalker said:

problem installing driver awus036nhr with seven 64-bit sp1.
Tested with driver cd driver then downloaded from alfa, installation and key not recognized.
A solution?
thank

Andi

Andi said:

I tested the Alfa Network AWUS036NHR 2W adapter with bt5r2 and it is working out of the box with monitor mode etc….
Works brilliantly;
Was afraid after buying the adapter that it wouldn’t work, but it runs like a charm.
That adapter + a 9dBi omni antenna is powerful.
Question though, wasn’t able to get it to work with XiaoPan Linux, although on the dishtech blog the author mentions that it worked with his RTL8188RU chipset.
Anyone knows how to enable this?

Dan

Dan said:

Same here
make1: Entering directory `/lib/modules/2.6.39.4/build’
make1: * No rule to make target `modules’. Stop.
make1: Leaving directory `/lib/modules/2.6.39.4/build’
make: * [modules] Error 2
Compile make driver error: 2, Please check error Mesg

Yogesh

Yogesh said:

AWUS036NHR works out of the box on BT5R2 with monitor mode??

John

John said:

Is this article/blog still applicable to BackTrack 5 Release 3? I can’t seem to pick up station mac addresses. Thx.

Johnny

Johnny said:

When you install driver for NHR on Win7, FIRST plug in NHR, THEN install driver. I tried it with BTR5 R3, somehow it monitors only channel 11 after I enter “airodump-ng mon0”

Adel

Adel said:

My problem is I use this Alfa on VMWARE it works fine but only displays 802.11.n when I type wash -i mon0

any reasons why? it wont show 802.11.g

please help!

Phoenix Draco

Phoenix Draco said:

For later versions of the 2.6 kernel (as well as recent kernels), the smp_lock.h was removed. What used to be contained therein was moved into . To successfully install the ALFA drivers, however, it is necessary to take a couple of extra steps. This is taken from the most recent release of BackTrack R5:

1. (Optional, Recommended) Update and upgrade your distro via apt-get update and apt-get dist-upgrade

2. Go to /usr/src/linux and perform a ‘make modules’ (this generates the Modules.symvers file, along with compiling the kernel modules)

3. Unpack the ALFA driver ZIP file for Linux into some directory (e.g. unzip -xqo)

4. cd into the main Alfa directory, go into drivers

5. Edit the files (e.g. in vim)

driver/rtl8192_8188CU_linux_v3.0.2164.20110715/include/osdep_service.h
driver/rtl8192_8188CU_linux_v3.0.2164.20110715/include/rtw_io.h

and search for the #include for smp_lock.h (one in each file). Comment out or delete the line and save the files.

6. Rebuild the tar file in drivers:

tar zcvf rtl8192_8188CU_linux_v3.0.2164.20110715.tar.gz rtl8192_8188CU_linux_v3.0.2164.20110715

This is necessary as install.sh unpacks the source from there and will overwrite your changes if you don’t rebuild the archive

7. Return to the main directory and proceed with ./install.sh

At the end of this, you should have working ALFA drivers. The one thing I have not been able to do is use iwconfig to set the tx-power to anything other than default

I recommend a reboot after this, but rmmod / insmod will also work.

Happy BackTrackage!

Leave a comment

Please note: comments must be approved before they are published.