Alfa Awus036nhr: USB WiFi adapter Tested, is working!


7 posts
by naftaism » Tue May 07, 2013 3:52 pm
Hi guys!
This post is for you, who want to know if this device work or not whit the raspberry pi.

I received my order just 45 minutes ago and... I can say: YES, it's working fine!
Just "plug and play"! (Debian 3.6.x Wheezy Raspbian). And i don't have power supply problems! No need the double usb cable!

Not sure for the AP mode, but i'll do some test in this days.

I found this page what don't talk about the Awus036nhr:
http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wi-Fi_Adapters

We got a new entry now :D
Posts: 72
Joined: Fri Feb 22, 2013 8:53 pm
by pjc123 » Wed May 08, 2013 11:30 am
naftaism wrote:I found this page what don't talk about the Awus036nhr:
http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wi-Fi_Adapters

We got a new entry now :D


So, why don't you add an entry so people can find it easily, as finding this post in the forums is a hit or miss? The wiki is a user supported web page.
Posts: 911
Joined: Thu Mar 29, 2012 3:37 pm
by alcantor » Tue Jun 25, 2013 6:54 pm
Hi,

I've trusted you and buyed a RPI to connect my Alfa Awus036nhr. It work very well just out the box... I've setup a connection over 750m with it.

I've just noticed a bug when unloading the module:

Code: Select all
[81310.083801] ------------[ cut here ]------------
[81310.083868] WARNING: at fs/proc/generic.c:849 remove_proc_entry+0x280/0x2a0()
[81310.083897] remove_proc_entry: removing non-empty directory 'rtl819xC/wlan0', leaking at least 'ampdu_enable'
[81310.083907] Modules linked in: 8192cu(-) ipt_MASQUERADE iptable_filter iptable_nat ip_tables nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack x_tables snd_bcm2835 snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer snd leds_gpio led_class [last unloaded: 8192cu]
[81310.084037] [<c0013a7c>] (unwind_backtrace+0x0/0xf0) from [<c001e2b4>] (warn_slowpath_common+0x4c/0x64)
[81310.084067] [<c001e2b4>] (warn_slowpath_common+0x4c/0x64) from [<c001e360>] (warn_slowpath_fmt+0x30/0x40)
[81310.084098] [<c001e360>] (warn_slowpath_fmt+0x30/0x40) from [<c011822c>] (remove_proc_entry+0x280/0x2a0)
[81310.084559] [<c011822c>] (remove_proc_entry+0x280/0x2a0) from [<bf332748>] (rtw_proc_remove_one+0xf4/0x188 [8192cu])
[81310.085161] [<bf332748>] (rtw_proc_remove_one+0xf4/0x188 [8192cu]) from [<bf3336bc>] (rtw_dev_remove+0x94/0x134 [8192cu])
[81310.085483] [<bf3336bc>] (rtw_dev_remove+0x94/0x134 [8192cu]) from [<c0277b94>] (usb_unbind_interface+0x48/0x108)
[81310.085533] [<c0277b94>] (usb_unbind_interface+0x48/0x108) from [<c02371b0>] (__device_release_driver+0x58/0xb0)
[81310.085560] [<c02371b0>] (__device_release_driver+0x58/0xb0) from [<c023797c>] (driver_detach+0xd8/0xe4)
[81310.085583] [<c023797c>] (driver_detach+0xd8/0xe4) from [<c0236ff8>] (bus_remove_driver+0x7c/0xc0)
[81310.085617] [<c0236ff8>] (bus_remove_driver+0x7c/0xc0) from [<c02774f8>] (usb_deregister+0x5c/0xf0)
[81310.085916] [<c02774f8>] (usb_deregister+0x5c/0xf0) from [<bf33c9e8>] (rtw_drv_halt+0x18/0x20 [8192cu])
[81310.086243] [<bf33c9e8>] (rtw_drv_halt+0x18/0x20 [8192cu]) from [<c005d7a0>] (sys_delete_module+0x1ac/0x248)
[81310.086299] [<c005d7a0>] (sys_delete_module+0x1ac/0x248) from [<c000da60>] (ret_fast_syscall+0x0/0x30)
[81310.086316] ---[ end trace 114d738619f45aa8 ]---


I've just try the managed mode for the moment...

Thanks
Posts: 1
Joined: Tue Jun 25, 2013 6:41 pm
by naftaism » Wed Sep 18, 2013 11:37 am
Hi again! Sorry for delay, i have not received notification of your answers in time!

@pjc123 When I wrote this post I wanted to wait to be more secure, just for deeply tests! I will do that soon!
@alcantor I'm very glad to read about that!

Some upgrade: now i'v got it working on Arch linux (Kernel 3.6.x and 3.10.x) just fine using netctl/wifi-menu or manually whit wpa_supplicant.

Now at distance of 4 months i have to say only monitor mode don't work out the box, but I'm close to finding a solution!
Why monitor mode? Because it can be usefull/required to use hostapd/airbase-ng to make rpi work as acces point...

In my laptop i'v already made that using debian/ubuntu, but every time i have to kill some processes (wpa_supplicant and network-manager) to activate monitor mode...
One fix for this is aviable on the productor site, but this remove the N capability of the card! And you can only use it not as client, but only for "monitoring" wireless...

P.S. Now are 4 mounths of full operative status (i'm talking about the wireless card!) 24h/24h! And i had no problem!
Posts: 72
Joined: Fri Feb 22, 2013 8:53 pm
by pcams » Wed Jan 08, 2014 10:49 pm
Realtek released a new driver, i was able to install it following this procedure:

1) Update apt-get repositories
Code: Select all
sudo apt-get update

2) Search for the most recent kernel-image and kernel-headers compatible with the Realtek driver (in this case 2.6.18~3.9)
Code: Select all
apt-cache search image

Got this ...
Code: Select all
linux-headers-3.10-3-rpi - Header files for Linux 3.10-3-rpi
linux-headers-3.2.0-4-rpi - Header files for Linux 3.2.0-4-rpi
linux-headers-3.6-trunk-rpi - Header files for Linux 3.6-trunk-rpi
linux-image-3.10-3-rpi - Linux 3.10 for RaspberryPI
linux-image-3.2.0-4-rpi - Linux 3.2 for RaspberryPI
linux-image-3.6-trunk-rpi - Linux 3.6 for RaspberryPI
linux-image-rpi - Linux for RaspberryPI (meta-package)
linux-image-rpi-rpfv - This metapackage will pull in the raspbian kernel based on the version

Went with linux-image-3.2.0-4-rpi and linux-headers-3.2.0-4-rpi

3) So let's install them!
Code: Select all
sudo apt-get install linux-headers-3.2.0-4-rpi linux-image-3.2.0-4-rpi

4) Now you should have vmlinuz-3.2.0-4-rpi and initrd.img-3.2.0-4-rpi into /boot
Code: Select all
ls /boot | grep 3.2.0-4

5) Open /boot/config.txt for edit...
Code: Select all
sudo nano /boot/config.txt

6) ... and add this
Code: Select all
# Set params for "raspbian debian-style kernel" boot
kernel=vmlinuz-3.2.0-4-rpi
initramfs initrd.img-3.2.0-4-rpi followkernel

7) Reboot your PI
Code: Select all
sudo shutdown -r now

8) Get the most recent linux drivers here

9) Unzip them, and give the right permissions to the install file
Code: Select all
unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911
sudo chmod +x install.sh

10) Get yourself the king chair ...
Code: Select all
sudo su

11) ... and watch your people work (run install.sh)
Code: Select all
./install.sh
##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
...
...
...
install -p -m 644 8192cu.ko  /lib/modules/3.2.0-4-rpi/kernel/drivers/net/wireless/
/sbin/depmod -a 3.2.0-4-rpi
##################################################
The Setup Script is completed !
##################################################

;)

This thread got me in the right direction:
http://www.raspberrypi.org/forum/viewto ... 71&t=29326

EDIT: Some language corrections and added some steps that I've forgotten.
Posts: 1
Joined: Wed Jan 08, 2014 10:31 pm
by epyonxero » Fri Feb 14, 2014 3:02 am
This is interesting, are you guys powering it through the RPi USB or with a powered hub?
Posts: 2
Joined: Wed Feb 05, 2014 1:06 am
by naftaism » Fri Apr 04, 2014 12:51 am
@pcams: Wow! Nice news!
I need to give it a try! I don't have time to test it for now, but i will do that for sure!

@epyonxero: I'v just plugged the adapter directly on my rpi whitout power issues :D

P.S. I'm using an 2A power adapter from an old nexus 7 (2013).


Update for Arch Linux users:
The latest driver for this chipset based devices is not compatible whit kernels >3.9.X.
Actual versions of Arch linux (kernel 3.10.X) comes by default whit the dkms driver, what does not work (aur package).
Starting from 3.13.X kernels the arch images have the original rtl8192cu module, and this is the only one working .

If you come from a 3.10 or a 3.12 kernel, you just have to do an update, reading the pacman's logs during installation you will see "8192cu" removed" (it will be replaced whit the standard/original one).

So:
Code: Select all
pacman -Syu linux-raspberrypi-latest

will install the 3.13.9-1 kernel, if you have some "conflicts" just remove it by (for example):
Code: Select all
pacman -R linux-raspberrpi


This driver works very well. The only one "bug" (not sure if it is a bug) is on the device led, what is always on!
Posts: 72
Joined: Fri Feb 22, 2013 8:53 pm