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

Re: Automatic setup for RTL8188CUS based wifi adapters

Mon Jul 30, 2012 12:14 pm

makernz wrote:Fantastic instructions! Worked like a charm with my ASUS USB-N10 plugged directly into my Pi.

Thanks so much!
If you use command lsusb what does it show for your Asus USB-N10?

EDIT: and what does the output of command lsmod show?
Last edited by MrEngman on Mon Jul 30, 2012 12:32 pm, edited 1 time in total.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Mon Jul 30, 2012 12:28 pm

Montala wrote:
makernz wrote:Fantastic instructions! Worked like a charm with my ASUS USB-N10 plugged directly into my Pi.

Thanks so much!
Your comment puzzles me slightly as according to MrEngman "... you'll need to find the right driver, as the N10 driver is different to the one used with the Edimax. 8192SU rather than the 8192CU used with rthe rtl8188cus devices."
The correct driver does however appear to be 'built in' to the latest Raspbian "Wheezy" image!
I'm a little confused as well. What driver file are you looking at. I don't see one but there does appear to be a firmware file. Bit like the 8188cus. There is a driver and firmware built in but the 8188cus won't work with it.
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
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: Automatic setup for RTL8188CUS based wifi adapters

Mon Jul 30, 2012 1:57 pm

MrEngman wrote:I'm a little confused as well. What driver file are you looking at. I don't see one but there does appear to be a firmware file. Bit like the 8188cus. There is a driver and firmware built in but the 8188cus won't work with it.
Just to confirm: I started off with a 'hard wired' ethernet connection, and a new Raspbian "wheezy" image, which I first updated and upgraded, and without installing anything else I plugged the Asus USB-N10 into my powered hub, whereupon the screen went blank, and my RasPi rebooted itself!

Now I am not sure if this was supposed to happen, or not (I don't think it was!) or whether it points to a problem with the PSU supplying my hub not really being 'powerful' enough!

Anyway, I then did a full 'restart' so that I could read the text on the screen, and saw a reference to "Loading firmware from 'rtlwifi/rtl8712u.bin

When I ran 'lsusb' the adapter was recognised as a Realtek RTL8188SU, and was shown in 'iwconfig' as wlan0

I then installed wicd (after a bit of a wait), although I did have to unplug the N10 to do this.

After running 'startx' and bringing up the terminal, I ran 'wicd-gtk', entered my interface details and after a few attempts it finally 'saw' my access point (a BT Home Hub' ) and although I had entered my passcode, I couldn't actually manage to connect to it.

Unfortunately I then ran out of time, which was a shame, but I hope to be able to continue later.

Hope this helps a bit! :)

makernz
Posts: 4
Joined: Mon Jul 30, 2012 9:45 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Tue Jul 31, 2012 5:51 am

MrEngman wrote:
makernz wrote:Fantastic instructions! Worked like a charm with my ASUS USB-N10 plugged directly into my Pi.

Thanks so much!
If you use command lsusb what does it show for your Asus USB-N10?

EDIT: and what does the output of command lsmod show?
command lsusb

Bus 001 Device 004: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]

command lsmod

It says that both 8192cu module is installed (which I am assuming is from your script), but also r8712u module is installed (which I am assuming was supported by Raspbian "Wheezy")

This is what I did:

-Wrote a fresh image of Raspbian "Wheezy" to my SD card
-Copied MrEngman's script to the root of the SD card
-Had my Pi connected to LAN
-Booted up Pi and followed the instructions listed by MrEngman
-Everything worked as described in the instructions, set my security, sssid and password
-Installation completed, rebooted my device (without LAN connected) and in the startup script before login it gives you the details of identifying the wifi adpater and configures itself 100% every time.

Have rebooted many times since, and every time my ASUS USB-N10 has worked correctly.

If you want any more information on the process I went through, let me know.

rphiggins
Posts: 3
Joined: Thu Jul 05, 2012 9:57 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Tue Jul 31, 2012 6:19 pm

I am sorry for asking such a very simple question.

I have a new Pi, and have set up the sd card ok using latest download from this site.
I am trying to use this excellent script and have put the latest script and drivers for edimax wifi on the sd card.

when I type

sudo /boot/install-rtl8188cus-latest.sh

I get "command not known"

When is do "ls" I can see that the files are all there ok

I did originally think it was called rt18188 and not rtL8188 but I am sure I have the file name spelt correctly.

As a complete noob it must be a very stupid error?

Thanks


HiC
Posts: 4
Joined: Wed Aug 01, 2012 7:51 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 7:59 am

rphiggins wrote:when I type
sudo /boot/install-rtl8188cus-latest.sh
I get "command not known"
Have you changed the permissions using "chmod a+x <file name>"?

rphiggins
Posts: 3
Joined: Thu Jul 05, 2012 9:57 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 8:33 am

Thanks for helping. No I haven't done this and will try it after work today. I haven't seen this command in the instructions, so are there other basic things I should be doing? I have read most of this thread and read the instructions from the excellent MrEngman.

HiC
Posts: 4
Joined: Wed Aug 01, 2012 7:51 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 9:51 am

Finally! :D After several trial-and-error sessions, I succeeded to get it to work properly! :D

The script is really great, albeit probably missing a sync command before the reboot ...
@Mr Engman: My suggestion is to add a sync command in future revisions of the script right before the reboot command. (I tried to write it through the terminal upon exit from the script but I was probably too slow to get it to have any effect...)

The symptoms were that everything worked fine except the reboot resulted in on red LED and a six-times flashing green LED indicating that start.elf didn't start.

As I didn't want to runt through the entire process once more, I downloaded the boot files from the github instead, put the SD card into my computer, copied the files that were readable to a backup (.firmware-whatever and start.elf was not readable), re-formatted the drive, put the files back and added the github-version of start.elf. (This was the conservative approach as well as an effort to really make sure that the *only* problem was a damaged boot partition caused by the missing sync command.)

After that, I put the SD card back into the pi and it rebooted, connected the dongle to the network, and works!

Thanks Mr Edman!

jonathanw
Posts: 5
Joined: Wed Aug 01, 2012 11:16 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 2:38 pm

Worked like a charm the second time.

For some reason i couldnt start the install-rtl8188cus.sh file, but the install-rtl8188cus-latest.sh worked.

PaulCheffus
Posts: 381
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 3:13 pm

HiC wrote:The symptoms were that everything worked fine except the reboot resulted in on red LED and a six-times flashing green LED indicating that start.elf didn't start.
Hi

I had exactly the same problem after running rpi-update on my Transcend card. I don't think it is a problem with the script as such but with rpi-update (which I believe the script runs) and certain SD cards (my Kingston card was fine).

Cheers

Paul
Procrastination - The Thief of Time.

HiC
Posts: 4
Joined: Wed Aug 01, 2012 7:51 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 3:44 pm

The correct credit should go to MrEngman, of course :oops:

If it's important to anyone, my dongle is a MicroNEXT MN-WD152B with the device ID 0bda:8176 as reported by lsusb. It's, however, listed as "Problem USB Wifi Adapters" on the RPi VerifiedPeripherals page.

HiC
Posts: 4
Joined: Wed Aug 01, 2012 7:51 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 3:51 pm

I don't think it is a problem with the script as such but with rpi-update (which I believe the script runs) and certain SD cards
Yes, the behavior can be different among different SD cards. But the script obviously deletes two files before rebooting the machine. Shouldn't there be a sync command first to make sure that the changes are properly written to the SD card before rebooting? (Or is there an implied sync built-in into rm or reboot?)

It's a pitty, I didn't manage to run sync before the reboot. Had I another SD card, I would try it for sure. Now, I don't want to mess up the one I finally got working so well.

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 5:26 pm

Surely the normal software should make sure everything is synced properly before it shuts down or reboots. Not very clever if it doesn't.

However a sync has been added to the end of the script before rebooting. Most likely your problem was to do with a bad write at some point during updating or rpi-update.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 5:34 pm

makernz wrote:
MrEngman wrote:
makernz wrote:Fantastic instructions! Worked like a charm with my ASUS USB-N10 plugged directly into my Pi.

Thanks so much!
If you use command lsusb what does it show for your Asus USB-N10?

EDIT: and what does the output of command lsmod show?
command lsusb

Bus 001 Device 004: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]

command lsmod

It says that both 8192cu module is installed (which I am assuming is from your script), but also r8712u module is installed (which I am assuming was supported by Raspbian "Wheezy")

This is what I did:

-Wrote a fresh image of Raspbian "Wheezy" to my SD card
-Copied MrEngman's script to the root of the SD card
-Had my Pi connected to LAN
-Booted up Pi and followed the instructions listed by MrEngman
-Everything worked as described in the instructions, set my security, sssid and password
-Installation completed, rebooted my device (without LAN connected) and in the startup script before login it gives you the details of identifying the wifi adpater and configures itself 100% every time.

Have rebooted many times since, and every time my ASUS USB-N10 has worked correctly.

If you want any more information on the process I went through, let me know.
The driver for the N10 is not the one my script loads. It appears that the driver is already loaded and all my script does is set up some of the files that are needed, specifically /etc/network/interfaces. Otherwise it loads a driver you do not need.

Interesting solution though.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 6:03 pm

rphiggins wrote:I am sorry for asking such a very simple question.

I have a new Pi, and have set up the sd card ok using latest download from this site.
I am trying to use this excellent script and have put the latest script and drivers for edimax wifi on the sd card.

when I type

sudo /boot/install-rtl8188cus-latest.sh

I get "command not known"

When is do "ls" I can see that the files are all there ok

I did originally think it was called rt18188 and not rtL8188 but I am sure I have the file name spelt correctly.

As a complete noob it must be a very stupid error?

Thanks
Is that just "ls" or is it "ls /boot"? try ls -l /boot. That will show the file permissions and it should show permissions as -rwxr-xr-x. You need at least the first -rwx to run the file as a script.

You can set file permissions using chmod. To set permissions on the script you can do

Code: Select all

sudo chmod 755 /boot/install-rtl8188cus-latest.sh
(using sudo to run as root). Although 700 should be OK as well.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 6:21 pm

HiC wrote:The correct credit should go to MrEngman, of course :oops:

If it's important to anyone, my dongle is a MicroNEXT MN-WD152B with the device ID 0bda:8176 as reported by lsusb. It's, however, listed as "Problem USB Wifi Adapters" on the RPi VerifiedPeripherals page.
Thank you very much HiC, and to everyone else who've expressed their thanks very much appreciated. :D

I wouldn't worry too much about the problem wifi adapters. all rtl8188cus adapters will hang the pi if the driver is not installed. That's a software problem not a wifi adapter issue. Of course I've spent the last 35-40 yrs as a hardware design engineer, and writing real software in assembly language and still do occasionally, so I know all about software problems :twisted:
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

GeorgWassen
Posts: 1
Joined: Wed Aug 01, 2012 8:00 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 8:10 pm

Hi MrEngman,

first thank you very much for your work. The script helped me a lot.

Although, I have a suggestion for an improvement: My system uses LANG=de and your script didn't proceed from the message "The wifi adapter driver is installed. Waiting for the wifi adapter to connect." (line 879) because the line "inet addr:" (line 893) is localized to "inet Adresse:" (German). The solution was very easy:

Code: Select all

export LANG=C
...and the output is in English again. If you include that setting at the beginning of the script, it will work independently from the user's localization.

Best regards,
Georg.

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Aug 01, 2012 9:55 pm

GeorgWassen wrote:Hi MrEngman,

first thank you very much for your work. The script helped me a lot.

Although, I have a suggestion for an improvement: My system uses LANG=de and your script didn't proceed from the message "The wifi adapter driver is installed. Waiting for the wifi adapter to connect." (line 879) because the line "inet addr:" (line 893) is localized to "inet Adresse:" (German). The solution was very easy:

Code: Select all

export LANG=C
...and the output is in English again. If you include that setting at the beginning of the script, it will work independently from the user's localization.

Best regards,
Georg.
Good suggestion Georg. Thank you. I have updated the script and added the extra line you suggested.
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
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Aug 02, 2012 9:20 pm

I don't wish to stray too far 'off topic' here, as I know my adapter does not feature this particular chipset, but as an update to my earlier post, the next time I 'booted up' with the Asus USB-N10 adapter and my Logitech K400 'dongle' connected to a powered hub (which also supplied my Raspberry Pi) but with no wired Ethernet connection, I found I had immediate Wi-Fi access... and that was without me having to manually download any drivers... or run any scripts!

I have also posted some comments in the Asus USB-N10 thread, but would be pleased to try and answer any questions.... perhaps there, rather than here though!

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Aug 02, 2012 10:01 pm

pjc123 wrote:Has anyone been able to get roaming working with wpa_supplicant on the RTL8188CUS? There are a ton of options for the wpa_supplicant.conf file, and I have tried a bunch, but I just can't get it to work. It does work fine with just the interfaces file only, so I know the dongle is working. I have two routers and it is a real pain having to change the interfaces file every time I want to change the router I need to use.

By the way, the latest Engmann script fixed my dongle that stopped working by selecting the upgrade option. I never do a firmware update specifically, but it must be done when I do an apt-get upgrade, so I suspect that is what killed it. Is there a way to perform an upgrade of all programs yet exclude some? I imagine there must be a file somewhere to set excludes.
I was able to get wpa_supplicant working today so that roaming works and it will automatically find the first available router (in the order or priority of my choosing) during the boot process and assign a DHCP address and turn on wlan0 so my headless pi is ready to be logged in to. I use a quick nmap ping scan to discover the ip address. Also, by adding a parameter to the file it can even locate routers with hidden (not broadcasted) SSID's, which was not possible with the /etc/network/interfaces file. Another feature of wpa_supplicant is that it is not necessary to escape the special character "\" in the psk password key, which was necessary in /etc/network/interfaces.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
manuti
Posts: 21
Joined: Mon Jan 09, 2012 1:52 pm
Location: Spain
Contact: Website Twitter

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Aug 03, 2012 6:55 am

MrEngman wrote:I have just uploaded a modified script to Dropbox.

Now there is no need to modify any files before copying them to the Pi and installing your Wifi. Just copy the files to the SD card, plug in your Pi and run the script to install your Realtek RTL8188CUS based wifi adapter.

The instructions can be downloaded from: http://dl.dropbox.com/u/80256631/install-rtl8188cus.txt
and the script itself from: http://dl.dropbox.com/u/80256631/install-rtl8188cus.sh

Have fun with your Raspberry Pi.
Excelent, works on my Raspberry Pi with Raspbian and Inves model: I-W311USB
Raspberry para torpeshttp:/raspberryparatorpes.net

tony-allan
Posts: 4
Joined: Sat Aug 04, 2012 3:17 am
Location: Melbourne, Australia

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Aug 04, 2012 5:22 am

I'm using a Netgear N150 Wireless USB Micro Adapter.
The example above worked for me...

Code: Select all

cd /boot
sudo wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
sudo wget http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
sudo install-rtl8188cus-latest.sh
After reading http://www.raspberrypi.org/phpBB3/viewt ... 66&t=11807
I stopped at the message:
Press cntl-C to terminate the installation, any other key to continue…
and then used:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
I also added a line (before "exit"):

Code: Select all

ifconfig
to /etc/rc.local so I can see what IP addresses are allocated.

User avatar
Trixster
Posts: 261
Joined: Sat Jul 07, 2012 3:53 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Aug 04, 2012 10:14 am

I seem to have a bit of trouble getting this working, using a fresh Raspbian install and an Edimax EW-7811Un.

I've copied the latest script to root and have successfully run it with a wired Internet connection connected. It appears to work fine, and I can confirm that the wifi adapter is connecting to the router correctly. The problem is when the script finishes and reboots - I remove the LAN cable as briefed, click enter to start the reboot processes and then once that's completed the pi will not start up again. I've tried removing the wifi adapter but no joy. The pi just will not boot up again with this sd card in. The power light comes on ok and the OK light periodically flashes but there's nothing showing on the screen.

I'm using the standard RS power supply, and the fact that the script appears to enable it fine suggests to me this isn't a power issue. Thoughts?

PaulCheffus
Posts: 381
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Aug 04, 2012 10:51 am

Trixster wrote:I seem to have a bit of trouble getting this working, using a fresh Raspbian install and an Edimax EW-7811Un.

I've copied the latest script to root and have successfully run it with a wired Internet connection connected. It appears to work fine, and I can confirm that the wifi adapter is connecting to the router correctly. The problem is when the script finishes and reboots - I remove the LAN cable as briefed, click enter to start the reboot processes and then once that's completed the pi will not start up again. I've tried removing the wifi adapter but no joy. The pi just will not boot up again with this sd card in. The power light comes on ok and the OK light periodically flashes but there's nothing showing on the screen.

I'm using the standard RS power supply, and the fact that the script appears to enable it fine suggests to me this isn't a power issue. Thoughts?
Hi

http://elinux.org/R-Pi_Troubleshooting# ... ic_pattern

The answer in my case was to copy the firmware files from another card then it was ok. You can also get the files from here
http://elinux.org/R-Pi_Troubleshooting# ... g_firmware

Cheers

Paul
Procrastination - The Thief of Time.

Return to “Beginners”