pmonro
Posts: 35
Joined: Wed Jun 27, 2012 6:46 pm
Location: New Zealand

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Sep 05, 2012 6:42 pm

MrEngman wrote:
pmonro wrote::D
.

As you already have the file on your SD card you can rename it in linux with the mv, "move/rename", command e.g.

Code: Select all

sudo mv /boot/8192cu-20120726.tar.tar /boot/8192cu-20120726.tar.gz
Thakyou for your very quick reply.
I had previously renamed the file tar.gz using windows (but that did not work) so I thought I had best to check the file name in linux using sudo ls /boot. To my surprise it was then a tar.gz.tar file. So I renamed it with your sudo ms /boot etc .
Success. My wifi adaptor is coming by post so I await its arrival.
Thaks again for your input
P monro

EtheB
Posts: 23
Joined: Sat Dec 24, 2011 6:43 am
Location: Rangiora, New Zealand

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Sep 05, 2012 7:05 pm

A really BIG thank you to MrEngman (with able assistance from Smartybones- thank you as well) for your really excellent guide to getting a Realtek 8188 based WiFi adapter up and running on my RPi - thank you!

One wrinkle to report - after running your script, the WiFi connected fine, I then did as suggested and elected to update the system. After a significant amount of downloads, unpacks, etc.. we finally came to the ......
'We're running for the first time'
...mesage, this was then followed by.....
'Setting up firmware (this will take a few minutes)
cp: reading '/boot/KERNEL~1.TMP': Input/output error
cp: failed to extend '/boot.bak/KERNEL~1.TMP': Input/output error
rpi-update returned an error

As the latest version of the driver expects rpi-updater to have run the driver has not been installed - the script will now terminate.
Have fun with your Raspberry Pi.'

Rebooting the RPi resulted in no WiFi.

I then reconnected via Ethernet and ran the script again using the 'Update' option. When complete I opted NOT to update the RPi firmware but instead re-booted the RPi - voila! Everything worked exactly as it should!

I hope this helps, and thanks again for all of your hard work helping us new (and in my case, also old!) RPi owners get more out of their new-found hobbies.

Eric in NZ
If it doesn't fit, use a larger hammer, else fit a bigger fuse and 'tune' for maximum smoke :-)

Alesbi
Posts: 109
Joined: Wed Aug 22, 2012 3:18 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Sep 05, 2012 9:36 pm

If I plugged my SD card into my laptop, ran the script, installed the drivers, then put the SD card back into the Pi, would that work? Without having to SSH/perform actions from the Pi itself?

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Sep 05, 2012 10:51 pm

Alesbi wrote:If I plugged my SD card into my laptop, ran the script, installed the drivers, then put the SD card back into the Pi, would that work? Without having to SSH/perform actions from the Pi itself?
You have to run the script ON the RPi.

You can copy the script to your SDcard while it is mounted on your laptop, to run the script you need to do it on the RPi when it is running.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

kcranley
Posts: 16
Joined: Fri Jan 20, 2012 10:33 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Sep 06, 2012 1:29 pm

Thank you (Mr Engman) so much - I was following this conversation very closely as I had similar problems after updating/upgrading, and thanks to your solutions, I got it going - what a marathon. Your efforts are much appreciated.

dteich02
Posts: 3
Joined: Tue Aug 07, 2012 5:39 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Sep 06, 2012 2:43 pm

kcranley wrote:Thank you (Mr Engman) so much - I was following this conversation very closely as I had similar problems after updating/upgrading, and thanks to your solutions, I got it going - what a marathon. Your efforts are much appreciated.
Same boat. A big thanks to all the folks here who have been troubleshooting these adapters. I went through a whole collection of some of the problems seen throughout this thread (power issues, wrong kernel, updates, etc) and finally got mine up and running last night.

Thanks to all for the efforts.

Cuitlahuac
Posts: 1
Joined: Thu Sep 06, 2012 7:13 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Sep 06, 2012 7:17 pm

Mr Engman, thank you for sharing your work, took me some time to make work (I´m a newbie) but my wifi is working. Best regards.

LondonPi
Posts: 2
Joined: Thu Sep 06, 2012 10:56 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Sep 06, 2012 11:46 pm

Hi there,

I'm new to the Pi, just go it this week and am from a mostly-Windows background. I have the Edimax wireless adapter listed in the dropbox and I am trying to follow the script you provided.
I once ran the setup without the adapter in and it ran successfully. I input all the SSID/password etc.
Now when I start up the Pi without the adapter it warns me that "wlan0 is not connected". I take this as a good sign that the script ran properly and it's searching for the unplugged adapter.

However when I reran the script and it prompts me to plug in the wifi adapter I plug it in and my keyboard cuts out, so I can't "press any key to continue".

I am using a Microsoft Curve 2000 keyboard, rated 5V 100mA on the back. I've not really had problems with it the rest of the time with my Pi. If those numbers sound too high please tell me and I'll try to borrow a lower power keyboard.
I'm using a nearly fresh SD card with Raspbian on it (downloaded 15-07-2012). The only additions are the 2 licence keys for MPEG and WVC-1 and installing xterm.

If I turn it on with the adapter plugged in the keyboard is unresponsive (though the startup screen indicates its detected it, I see its name flash past) but periodically the green light on the adapter rlashes and the CPU monitor indicates some usage, so I expect it's doing something but with no keyboard I can't really find out what.
If I then unplug the adapter, my CPU usage jumps to 20% permanantly but the keyboard (even un/replugged) remains unresponsive until I reboot the Pi.
(Sorry if this is longwinded, I'm just trying to flesh out the problem and what I've tried)

MrEngman
Posts: 3849
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 2:15 am

LondonPi wrote:Hi there,

I'm new to the Pi, just go it this week and am from a mostly-Windows background. I have the Edimax wireless adapter listed in the dropbox and I am trying to follow the script you provided.
I once ran the setup without the adapter in and it ran successfully. I input all the SSID/password etc.
Now when I start up the Pi without the adapter it warns me that "wlan0 is not connected". I take this as a good sign that the script ran properly and it's searching for the unplugged adapter.

However when I reran the script and it prompts me to plug in the wifi adapter I plug it in and my keyboard cuts out, so I can't "press any key to continue".

I am using a Microsoft Curve 2000 keyboard, rated 5V 100mA on the back. I've not really had problems with it the rest of the time with my Pi. If those numbers sound too high please tell me and I'll try to borrow a lower power keyboard.
I'm using a nearly fresh SD card with Raspbian on it (downloaded 15-07-2012). The only additions are the 2 licence keys for MPEG and WVC-1 and installing xterm.

If I turn it on with the adapter plugged in the keyboard is unresponsive (though the startup screen indicates its detected it, I see its name flash past) but periodically the green light on the adapter rlashes and the CPU monitor indicates some usage, so I expect it's doing something but with no keyboard I can't really find out what.
If I then unplug the adapter, my CPU usage jumps to 20% permanantly but the keyboard (even un/replugged) remains unresponsive until I reboot the Pi.
(Sorry if this is longwinded, I'm just trying to flesh out the problem and what I've tried)
Sounds like you need a new power supply not a different keyboard. Or you may get it working by plugging the wifi adapter into a powered hub. There's plenty of discussions about suitable power units throughout the forum and the wiki. And also using hubs for the wifi adapters. Although not always necessary if you have a high quality power supply, not a phone charger or equivalent.

Even though the keyboard label says 5v 100mA I'd expect it to take a fair bit less. This is a standard USB power spec in which the max current is stated in units of 100mA, e.g. 100mA, 200mA, 300mA etc, and is not the actual max current. Mine indicates the same but uses less than 3mA with no LEDs on and less than 27mA with all 3 LEDs on. The wifi adapter, however, will take quite a bit more than 100mA when active especially when transmitting.

So you ran the script and ignored the instructions to plug in the wifi adapter. OK, that's up to you, but don't expect it to work when you've fixed your power issues.

When you re-run the script please follow the instructions although I cannot say if it will work since you didn't the first time. It should ask if you want to upgrade or add a new adapter. Select upgrade. If it does you may be OK and it may set things up alright. If it doesn't then the setup's likely broken and you may need to fix files by editing by hand as it were, rather than via the script.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

rakeshpai
Posts: 3
Joined: Tue Sep 04, 2012 9:02 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 5:11 am

MrEngman wrote:
rakeshpai wrote: Thanks again, MrEngman. My driver was at a slightly different location (/lib/modules/3.2.27+/kernel/drivers/net/wireless/rtl8192cu/8192.ko), but once I rm'd it and re-ran your script, it just worked! Thanks!

@thsBavR10 and @Zaphod: Your symptoms sound exactly like mine. The fix MrEngman mentioned above worked for me.
The driver version you deleted was NOT the one I suggested you delete. The one you deleted was the new version of the driver.
Man, I wish there was a way to edit my post, so that people don't follow what I had done.

What's weird is that everything worked for me when I made the changes I made. I guess that means I'm running off the old drivers with the new kernel then. (I'm still very new to Linux, so I'm still learning the ropes.) Will try to get back to the new drivers later today, and will report in if I have any trouble.

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 5:21 am

One of side effects removing the Edit button.

Might be able to get one of the moderators to mark that post as not a good idea.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 9:13 am

Dweeber wrote:Might be able to get one of the moderators to mark that post as not a good idea.
I've added a comment to the post.

User avatar
piglet
Posts: 907
Joined: Sat Aug 27, 2011 1:16 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 9:33 am

Is there a reason this driver can't be added into the core distribution? It just seems odd to have to rely on a charitable person recompiling and uploading to dropbox each time there's a kernel change.

/me looks at dom with hopeful expression....

MrEngman
Posts: 3849
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 9:40 am

piglet wrote:Is there a reason this driver can't be added into the core distribution? It just seems odd to have to rely on a charitable person recompiling and uploading to dropbox each time there's a kernel change.

/me looks at dom with hopeful expression....
It has been. This is what the last couple of pages of posts has been about.

MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
piglet
Posts: 907
Joined: Sat Aug 27, 2011 1:16 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 9:42 am

Ha! Sorry. I've got a little behind. Have some bacon.

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 2:39 pm

Hmm, not working for me. Have latest kernel, done updates, ran script, does not scan for networks. Says "wlan0 Interface doesn't support scanning".

How darned annoying.

I have an EDIMAX EW-7811Un "N150 Nano" NIC. I can see it in the lsusb output. It is running from a powered hub (built into my Lapdock). On bootup, if it is plugged in, I get the "Calling CRDA etc" error plus loads of other errors about trying to kill a modprobe command (although these seem to be dumped direct to stderr, not the log file. The "Calling CRDA" message is accompanied by a very long wait.

I had it working briefly by booting without the NIC connected then connecting it and running the auto install script, but now it does not work at all. iwconfig reports no wlan interfaces at all..

Any ideas?

MrEngman
Posts: 3849
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 4:09 pm

JonB wrote:Hmm, not working for me. Have latest kernel, done updates, ran script, does not scan for networks. Says "wlan0 Interface doesn't support scanning".

How darned annoying.

I have an EDIMAX EW-7811Un "N150 Nano" NIC. I can see it in the lsusb output. It is running from a powered hub (built into my Lapdock). On bootup, if it is plugged in, I get the "Calling CRDA etc" error plus loads of other errors about trying to kill a modprobe command (although these seem to be dumped direct to stderr, not the log file. The "Calling CRDA" message is accompanied by a very long wait.

I had it working briefly by booting without the NIC connected then connecting it and running the auto install script, but now it does not work at all. iwconfig reports no wlan interfaces at all..

Any ideas?
What is the output of commands

Code: Select all

uname -a
lsmod
If you've plugged the adapter in before running the scrip then you may have some trouble. It's possible file /etc/udev/rules.d/70-persistent-net.rules may have an invalid entry stopping the wifi adapter being recognised correctly. Delete the file if it exists. Reboot without the wifi plugged in and then run the script. Follow the on-screen instructions for when to plug it in.

If you have upgraded to the very latest linux version #114 the driver is included in the image otherwise it will need to download the driver, then the script should allow you to configure the files and enable the driver.

If you have already run the script and entered ssid and password details previously you will be asked if you want to upgrade or add a new wifi adapter. Select upgrade. Otherwise just follow the instructions.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 5:51 pm

Thanks for the quick reply! :)

OK, I followed your suggestion but still no joy (with the NIC plugged into the PI). Then I noticed the capslock light flash on the keyboard, which means a USB disconnect / reconnect, which on my setup means power problems. Plugged the Lapdock into the mains and redid the procedure, but with the NIC plugged into the Lapdock's USB port instead of the Pi's.

Success. It even appears to have an IP address.

rpi-update part is now complete but the script is saying that it can't find wlan0. A re-run gives the same old loop "The scan for wifi networks failed to find any networks".

Hmm.

MrEngman
Posts: 3849
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 6:01 pm

JonB wrote:Thanks for the quick reply! :)

OK, I followed your suggestion but still no joy (with the NIC plugged into the PI). Then I noticed the capslock light flash on the keyboard, which means a USB disconnect / reconnect, which on my setup means power problems. Plugged the Lapdock into the mains and redid the procedure, but with the NIC plugged into the Lapdock's USB port instead of the Pi's.

Success. It even appears to have an IP address.

rpi-update part is now complete but the script is saying that it can't find wlan0. A re-run gives the same old loop "The scan for wifi networks failed to find any networks".

Hmm.
what is output from commands

Code: Select all

uname -a
lsmod
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

kevs3d
Posts: 23
Joined: Fri Sep 07, 2012 6:26 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 6:31 pm

I've joined the forum just now to say this, you sir MrEngman are a *legend* :) thank you for all your hard work and effort. Thanks to you i have wireless working (no other guide i found worked correctly!!) and after updating the kernel (which broke my wireless), your information allowed me to fix it and get it working again. So massive win to you sir. :mrgreen:

Kev
--
http://www.kevs3d.co.uk/dev

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Sep 07, 2012 8:23 pm

Code: Select all

[email protected] ~ $ uname -a
Linux raspberrypi 3.2.27+ #114 PREEMPT Tue Sep 4 00:15:33 BST 2012 armv6l GNU/Linux
[email protected] ~ $ lsmod
Module                  Size  Used by
snd_bcm2835            20345  0 
snd_pcm                74834  1 snd_bcm2835
snd_page_alloc          4951  1 snd_pcm
snd_seq                52536  0 
snd_seq_device          6300  1 snd_seq
snd_timer              19698  2 snd_seq,snd_pcm
snd                    52489  5 snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_bcm2835
8192cu                485042  0 
joydev                  9102  0 
evdev                   8682  3 
[email protected] ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 019: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 020: ID 22b8:0938 Motorola PCS 
Bus 001 Device 021: ID 22b8:093a Motorola PCS 
Bus 001 Device 022: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
[email protected] ~ $ 
From what I have read on this thread all the above appears to be OK.

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Sep 08, 2012 1:16 pm

From the Design Flaw thread about Polyfuses... discussion of the script seems more relevant here.
MrEngman wrote: I've had enough problems with the script, and there are still a few outstanding, never mind not having to work out how to restart half way through and then continue on after a restart. Although I have been looking at it. Rather than a reboot, a shutdown and then power off, plug in the USB and then restart is probably more practical. Gives people more time to find the wifi adapter and plug it in.

However, If someone can point me in the right direction as to how to run the script after a restart it would be an interesting exercise I suppose.
Not sure if you want to mess with it, but the easiest place that I know about would be to replace the contents of /etc/rc.local with a stub to your script, and when you are done, put the original back.

This way, when you reboot while running your script, you can have the system end up back to your script for further processing without having the user do anything specific.

Saving the original script and then creating a temp version means less parsing of what might already be there and might be safer when you put it back unchanged when done.

I should have my second RPi here today and it should be Rev 2 board. It hit the main sorting station in PHX last night and should be out for delivery this morning though I won't see it until around 3pm my time typically.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

MrEngman
Posts: 3849
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Sep 08, 2012 1:58 pm

Dweeber wrote:From the Design Flaw thread about Polyfuses... discussion of the script seems more relevant here.
MrEngman wrote: I've had enough problems with the script, and there are still a few outstanding, never mind not having to work out how to restart half way through and then continue on after a restart. Although I have been looking at it. Rather than a reboot, a shutdown and then power off, plug in the USB and then restart is probably more practical. Gives people more time to find the wifi adapter and plug it in.

However, If someone can point me in the right direction as to how to run the script after a restart it would be an interesting exercise I suppose.
Not sure if you want to mess with it, but the easiest place that I know about would be to replace the contents of /etc/rc.local with a stub to your script, and when you are done, put the original back.

This way, when you reboot while running your script, you can have the system end up back to your script for further processing without having the user do anything specific.

Saving the original script and then creating a temp version means less parsing of what might already be there and might be safer when you put it back unchanged when done.

I should have my second RPi here today and it should be Rev 2 board. It hit the main sorting station in PHX last night and should be out for delivery this morning though I won't see it until around 3pm my time typically.
Thanks Dweeber,

Gives me something to look at. I have been trying it out by putting a script in /etc/profile.d which sort of works. Runs as a user logs in. Your suggestion is rather better.

However, first I want to see how things work with hot-plugging and no fuses on the USB side. I shall get really .... if my Pi crashes when I plug in a wifi adapter. Plugging in and removing devices with the system powered on is a standard feature of USB.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Sep 08, 2012 2:21 pm

I've been spending time this morning trying to get it back up and running again. Stopped working after the Sep 1st rpi-update. Same issue as others... loop, wlan0 doesn't support scanning. :-) If you boot with the WiFi plugged in modprobe errors... the old driver is not there so that is not the issue. Never see the WiFi ever blink anymore.

I'm about to just go to my backup and start from the last working version of the OS that I backed up a day previous. I suspect that the update that I did was somehow not very friendly... I think it changed some stuff with the USB drivers. subsequent updates seem to have fixed that, but I don't have a way to use Eth0 as a connection as it has never worked. I'm hoping the second RPi that shows up today doesn't have that issue.

Image
Image
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

Dave_PL
Posts: 4
Joined: Sat Sep 08, 2012 2:45 pm
Location: Cracow, PL

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Sep 08, 2012 2:49 pm

Ive got the same problem after updating from 3.2.27+ #102.

Return to “Beginners”