Trying to get an RTL8188CUS wireless USB NIC working.


58 posts   Page 1 of 3   1, 2, 3
by ryan29 » Thu Apr 19, 2012 10:10 pm
Hi,

Please let me know if there"s a better way to format plain text.  The "paste as plain text" option doesn"t seem to do much.

I"m using the debian6-13-04-2012 image.  I have one of these.  It"s got an RTL8188CUS chipset.  After following the WiFi instructions here, I plug the adapter in and I get the following from dmesg:
usb 1-1.2: new high speed USB device number 5 using dwc_otg
usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8176
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Manufacturer: Realtek
usb 1-1.2: SerialNumber: 00e04c000001
cfg80211: Calling CRDA to update world regulatory domain

After a very long time, I also get this from dmesg:
rtl8192cu:_rtl92cu_read_adapter_info():<0-0> EEPROM ID(0x0) is invalid!!
rtl8192cu:rtl92cu_init_sw_vars():<0-0> Failed to request firmware!
rtlwifi:rtl_usb_probe():<0-0> Can"t init_sw_vars.
usbcore: registered new interface driver rtl8192cu

I was going to try the drivers from Realtek, but I can"t figure out where / how to get the linux-headers needed to compile:
make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/3.1.9+/build M=/home/pi/rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103  modules
make: *** /lib/modules/3.1.9+/build: No such file or directory. Stop.
make: *** [modules] Error 2

Any tips?  I"m going to give the arch distro a try, but I"ve never used arch before.
Posts: 7
Joined: Thu Apr 19, 2012 8:29 pm
by error404 » Thu Apr 19, 2012 11:14 pm
You probably need the firmware-realtek package installed. This is from the non-free Debian repository so it's often not installed by default. Can't tell you if it's in the Pi image, but I'd expect not, it seems to be missing a ton of kernel modules and such. You can download the .deb from packages.debian.org and transfer it over on a USB stick if you don't want to connect it to the wired network to install it.
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm
by ryan29 » Fri Apr 20, 2012 4:52 am
I installed the firmware-realtek package before the original post.  The long hang after
Calling CRDA to update world regulatory domain

..also happens on boot.  If I boot up first and then plug in the usb adapter, lsmod gives me:
Module                  Size  Used by
rtl8192cu 87384 1
rtl8192c_common 52464 1 rtl8192cu
rtlwifi 61528 1 rtl8192cu
mac80211 171628 3 rtl8192cu,rtl8192c_common,rtlwifi
cfg80211 123084 2 rtlwifi,mac80211

..almost immediately.  It also causes lsusb to hang.  I tried the Arch image.  I didn't get very far because I don't know much about Arch, but it seemed to behave much better than the Debian image.  For example, lsusb works fine under Arch and shows info for my wireless usb adapter.
Posts: 7
Joined: Thu Apr 19, 2012 8:29 pm
by bredman » Fri Apr 20, 2012 9:03 am
I searched for 0bda 8176 and found the following

http://wiki.debian.org/rtl819x

It is not where I would have looked for 8188CUS, but there it is. You may find the instructions useful.
Posts: 1413
Joined: Tue Jan 17, 2012 2:38 pm
by ryan29 » Fri Apr 20, 2012 9:08 pm
Omer's guide links that wiki, but I must have been half asleep and didn't follow the link to that driver.  According to bredman's link, the firmware for RTL8192U based devices isn't bundled with firmware-realtek and needs to be provided by the user.

I might have to figure out how to get the Pi set up so I can try to build my own using the package off the Realtek site.
Posts: 7
Joined: Thu Apr 19, 2012 8:29 pm
by Guest » Sat Apr 21, 2012 7:56 pm
I was having the same issue, but I have managed to get it running with the driver supplied with the USB stick, (rtl8192_8188CU_linux_v3.0.2164.20110715)

from one of these: http://uk.farnell.com/micronex.....dp/2081765

just trying to compile, brought up errors regarding not finding smp_lock.h in the 3.1.9+ kernel

commenting out those includes gets the module built using:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KSRC=path/to/kernel KVER=3.1.9+ MODDESTDIR=path/to/SD/lib/modules/3.1.9+/kernel/drivers/net/wireless/

you will need to edit the paths to suit you.

install -p -m 644 8192cu.ko path/to/SD/card/lib/modules/3.1.9+/kernel/drivers/net/wireless/

will copy it to the right place for you.

boot and run:

sudo depmod - a

adding rtl8192cu to /etc/modprobe.d/blacklist.conf stops the old module loading

then you should be good to go.

I have put the module up to save you having to compile it too: 8192cu.ko

hope this helps.

A
by rew » Sun Apr 22, 2012 7:57 am
I've tried running an external SD card reader on the USB port. That didn't work. I haven't investigated much further, but I suspect that at times the reader draws more than 100mA and the fuse (starts to) blow.

This extra likely with a WIFI module. A wifi module will have to draw some measurable power to transmit packets.  Are you connecting it through a powered HUB? I'd recommend doing it that way.

Once I'm able to order an extra 'pi (In case I mess up) I'll be experimenting with shorting out the fuses. But not now. Sorry.
Check out our raspberry pi addons: http://www.bitwizard.nl/catalog/
User avatar
Posts: 391
Joined: Fri Aug 26, 2011 3:25 pm
by Guest » Sun Apr 22, 2012 9:15 pm
ajtag said:



I have put the module up to save you having to compile it too: 8192cu.ko

hope this helps.

A


Excellent, that works for my Edimax RTL8188CUS - thanks so much!
by ryan29 » Wed Apr 25, 2012 6:55 am
Everything is mostly working for me too.  I get a couple wpa_supplicant errors, but it'll associate and grab an IP address, so it shouldn't be too tough to get the rest of the configuration right.

Thanks for the note on blacklisting the old module ajtag.  That fixed my problems with my Pi freaking out and hanging for a while when I'd connect my adapter.  Your driver seems to work as well as one I compiled from the Realtek link I gave.

I've also seen rtl8192cufw.bin files floating around the net.  That might work with the firmware-realtek package, but I haven't tried it.

One note... When I compiled my driver, I did it once via cross compiling on a Debian machine and once on the Raspberry Pi.  I ended up with a different checksum on one of the compiled files (core/rtw_mlme_ext.o) and I'm not sure if that's normal or not.
Posts: 7
Joined: Thu Apr 19, 2012 8:29 pm
by colin B » Wed Apr 25, 2012 7:24 am
I found the Fedora 14 Remix-r1  install found my RTL8192SU WiFi adapter, but Debian 6 19-04-2012 didn't.

Unfortunately I can't even attempt to do anything with Debian as it wants the root password, which I don't have.
On a clear disk one can seek forever
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
by pdp7 » Fri Apr 27, 2012 6:19 pm
You should be able to run 'sudo' as user 'pi' when using the Debian image to run any command as root.
Posts: 31
Joined: Sat Mar 03, 2012 12:49 am
by colin B » Sat Apr 28, 2012 6:37 am
pdp7 said:


You should be able to run 'sudo' as user 'pi' when using the Debian image to run any command as root.


Nope, neither at a terminal prompt or within the GUI, for example I'm looking at FileManager and trying to open the folder as Root, all I get is 'Incorrect Password'.

I've tried, raspberry, raspberrypi, pi. In the shell I've tried what worked in the VM I had which is; su ~

I'm using the image Liam fiddled with (6-19-04-2012).
On a clear disk one can seek forever
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
by pdp7 » Sat Apr 28, 2012 7:10 am
Ah, the root account is locked in the image.  the pi user does have sudo which would allow you to run commands as root.  what is that you are trying to do that needs root privileges?
Posts: 31
Joined: Sat Mar 03, 2012 12:49 am
by colin B » Sat Apr 28, 2012 7:39 am
Install the WiFi modules.  I don't have a LAN connection where my television set is (the only HDMI enabled device I have at the moment), though I've just ordered an 8" HDMI monitor, so I need to get WiFi working and although T3Node.com have made a module available, I'm stuck on getting that onto the SD card as I can't access the boot partition as I can't get Root access.

It's been a long time since I used 'Nix fullstop, so perhaps I can get to the Root partition via the shell.
On a clear disk one can seek forever
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
by Chris.Rowland » Sat Apr 28, 2012 8:46 am
The File manager in the Debian image will not work, even if the root account has been unlocked. The unlock stuff doesn't seem to be built into it.  Leafpad won't write to a root file either.

But once the root account has been unlocked Gparted will work, you get messages or password requests that work.

The only option is to use a terminal to do many things that require root access.

I think this is a shame because it's inconsistent, it causes confusion among beginners to Linux and gives the impression that it's difficult.

Is there a way to get the file manager to work with the root areas of the file system? Is there an alternative file manager that would have this functionality?
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by pdp7 » Sun Apr 29, 2012 5:25 am
@bodgyuk ah, ok. I understand better now. Are you able to mount the Linux partition from the Debian SD card on your PC? If so, then you could copy the module over per the T3 instructions. You also need rtl8712u.bin from the firmware-realtek package. I"ve uploaded it here: https://www.dropbox.com/sh/i15azhv761rw0ey/hPHxoEzELh/rtl8712u.bin.

That file needs to be copied to /lib/firmware/rtlwifi/rtl8712u.bin on the SD card.

Then you should be able to boot on your TV and run "sudo depmod -a" from the shell. This should make the system recognize the new r8721u.ko you"ve copied over.

Then when you insert your adapter the kernel should load the r8712u module.

Fortunately, the current Debian image does include wpasupplicant so you should not have to install anymore packages to follow OmerK"s instructions to connect via WiFi: http://omer.me/2012/04/setting.....pberry-pi/
Posts: 31
Joined: Sat Mar 03, 2012 12:49 am
by colin B » Sun Apr 29, 2012 5:49 am
@pdp7,

Thanks, I'll give that a try tomorrow.
On a clear disk one can seek forever
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
by felixfurtak » Tue May 01, 2012 11:29 am
Thanks for the info and the files.

Putting it all together, I managed to get my Edimax EW-7811Un 802.11n [Realtek RTL8188CUS] working.

At least it's working on Debian. I've not had the same success on Arch yet.

Can anyone advise on any difference in the process for Arch?

Thanks,

Felix
Posts: 47
Joined: Wed Nov 16, 2011 10:41 am
by gooeygeek » Mon May 07, 2012 9:50 am
Got my Pi already – whoopee!

However, I can’t get WiFi set up, even with all the info from Omer and this topic.

I’m using an Edimax EW-7811Un wireless 802.11b/g/n nano USB adaptor. This is based on a Realtek RTL8188CUS chipset, and uses the rtl8192cu debian driver.

I’m using Debian squeeze from 19-04-2012.

The /etc/apt/sources.list already had ‘main non-free’.

I did:
sudo aptitude update
sudo aptitude install firmware-realtek wireless-tools

I also did:
sudo apt-get install wpasupplicant

but the wpasupplicant package was already up to date, as mentioned by @pdp7 (what is the difference between aptitude and apt-get?).

I added into /etc/network/interfaces:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid “NETWORK SSID”
wpa-psk “NETWORK PASSWORD”

Booting up the Pi with the dongle in place results in long timeouts from CRDA and somewhere after, so I boot up the Pi and then insert the WiFi dongle.

When I insert the dongle, I get the following from dmesg:
usb 1-1.2: new high speed USB device number 6 using dwc_otg
usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: 802.11b WLAN Adapter
usb 1-1.2: Manufacturer: Realtek
usb 1-1.2: SerialNumber: 00e04c000001
cfg80211: Calling CRDA to update world regulatory domain

I get the following from lsmod:
Module                  Size  Used by
rtl8192cu 87384 1
rtl8192c_common 52464 1 rtl8192cu
rtlwifi 61528 1 rtl8192cu
mac80211 171628 3 rtl8192cu,rtl8192c_common,rtlwifi
cfg80211 123084 2 rtlwifi,mac80211

But from iwconfig I only get:
lo no wireless extentions
eth0 no wireless extentions

(no mention of wlan0).

And from iwlist scan:
lo Interface doesn"t support scanning
eth0 Interface doesn"t support scanning

(again, no wlan0).

lsusb just hangs takes a very long time to come back (or not).

I haven’t been able to understand the instructions about the 8192cu.ko module, rtl8192cufw.bin, or other things mentioned in this topic.

Can anyone tell me where I should go from here?

Thanks

Update: I've managed to add 8192cu.ko – I did:
wget http://www.electrictea.co.uk/rpi/8192cu.tar.gz
tar -zxvf 8192cu.tar.gz
sudo cp 8192cu.ko /lib/modules/3.1.9+/kernel/net/wireless/

but still no go.

From what I’ve been reading, having lsusb hang seems to be indicative of a real problem...
Posts: 2
Joined: Sun May 06, 2012 8:51 am
by fulburncams » Mon May 07, 2012 4:51 pm
Hi gooeygeek

Some of this sounds familiar from when I tried the same process.  Are you using a USB Hub ( which one ?) or connecting direct to the Pi.  There are issues with USB Hub support within Raspi, and also some WiFi adapters take currents ( approx 140ma ) that are very close to the current limit of the Raspi USB port.

Cheers

Steve
User avatar
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm
by gooeygeek » Tue May 08, 2012 8:37 am
Thanks fulburncams – I was connecting direct to the Pi, so I was hopeful a powered hub might sort the problem, but unfortunately not.

I can't find any information about the current drain of the Edimax EW-7811Un, but using a powered hub (Belkin F5U027 7-port hub) makes no difference (though it has perhaps stopped the intermittent keyboard repeating-key problems).

The lsusb command seems to get thoroughly stuffed when I plug in the Edimax. Not only will ctrl-c not interrupt it, nor will ctrl-\ or ctrl-z.

Looking into lsusb, I see references to a /dev/bus/usb/ directory, which doesn't exist on my Debian (/dev/bus/ only has a input directory). Might that be a factor?

Or maybe I’ve a duff bit of hardware?

Thanks again.
Posts: 2
Joined: Sun May 06, 2012 8:51 am
by fulburncams » Tue May 08, 2012 3:41 pm
Well a couple of us have created short USB stub cables with the 5V cut,  so that you can feed the adapter direct without connecting to the Raspi USB supply, effectively going round the polyfuse and not requiring an external powered USB hub. Good luck,

Cheers

Steve
User avatar
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm
by tqm » Tue May 08, 2012 3:54 pm
gooeygeek said:


I can"t find any information about the current drain of the Edimax EW-7811Un, but using a powered hub (Belkin F5U027 7-port hub) makes no difference


This is not the power drain issue – 1A psu is more than enough. Problem is with the kernel modules…

The card works although if you are using Debian image it was a bit unstable… I say "was" because now it"s ok – I will post more info later tonight and drop link here. Works like a charm with WPA2-AES-CCMP wireless, didn"t segfault for almost 20h now, so that"s a huge improvement :-)

Seriously, setting it up takes no more than 5 minutes – when you know what to do.

UPDATE:

Detailed, step by step information how to get this wireless interface working can be found at http://www.ctrl-alt-del.cc/201.....s-ada.html - enjoy!
Posts: 16
Joined: Tue May 08, 2012 12:00 pm
by felixfurtak » Sat May 12, 2012 4:22 am
Hi,

Although ajtag"s 8192.ko file worked for me on Debian, I didn"t have much success using it with Arch, so I just compiled a new version for the current Arch distribution (currently 3.1.9-13+, after running pacman -Syu).

For reference, I am using an Edimax EW-7811un with USB ID 7392:7811 [RTL8188CUS] with the module compiled from the latest Realtek driver v3.4.2_3727.20120404

I uploaded it to here:

https://www.dropbox.com/s/vuih1z7e866omp9/8192cu.ko.gz

Installation is similar as the Debian image:

Firstly create a file in /etc/modprobe.d called blacklist.conf and add the line

blacklist rtl8192cu


and then type the following...

cp 8192cu.ko.gz /lib/modules/3.1.9-13+/kernel/drivers/net/wireless

depmod -a

modprobe 8192cu.ko

ifconfig wlan0 up

iwconfig wlan0 essid <MYESSID>

dhcpcd

should get you going.

Would appreciate any feedback on whether this works for you.

Felix
Posts: 47
Joined: Wed Nov 16, 2011 10:41 am
by glynn_bird » Sat May 12, 2012 6:36 am
I'm still struggling to get this working. I have a Pi running the latest Debian and I'm trying to get a MicroNEXT MN-WD552B working.

"lsusb" hangs on Debian, but with ArchLinux it says:

Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN

which led me to this thread. So I tried:

Download this file http://www.electrictea.co.uk/r.....2cu.tar.gz and copy it to the pi. Unpack it.

Edit /etc/modprobe.d/blacklist.conf and add a line:

blacklist rtl8192cu

On the pi:

sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/

#reboot, then
sudo depmod -a

But the Pi hangs when I inert the USB device . Any ideas ?

Thanks in advance.
Posts: 3
Joined: Sat May 12, 2012 5:28 am