Automatic setup for RTL8188CUS based wifi adapters


 
1148 posts   Page 7 of 46   1 ... 4, 5, 6, 7, 8, 9, 10 ... 46
by MrEngman » Sat Jun 16, 2012 1:33 pm
Montala wrote:Very many thanks to MrEngman for all his hard work on this subject, which I am sure will be appreciated by a lot of members... including myself!

I don't wish to stray too far 'off topic' here, but has anyone who has managed to get one of these devices working successfully done so with the tiny Edimax adapter plugged directly into one of the USB ports on their Raspberry Pi, and with something like a Logitech keyboard/mouse 'dongle' in the other one, without having to use a hub?

This is something I would really love to achieve! :)


I would think using the wifi adapter in one port and wireless keyboard/mouse dongle in the other port without a hub is likely to cause problems due to power consumption from the USB. An unfortunate consequence of the design of the Pi I'm afraid.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by alexeames » Sat Jun 16, 2012 2:12 pm
Montala wrote:I don't wish to stray too far 'off topic' here, but has anyone who has managed to get one of these devices working successfully done so with the tiny Edimax adapter plugged directly into one of the USB ports on their Raspberry Pi, and with something like a Logitech keyboard/mouse 'dongle' in the other one, without having to use a hub?


It works for me. Logitech MK260 mouse and keyboard dongle in one port and Edimax nano in the other. Although it's not my normal working arrangement. Rather a tight fit on the USB ports, but they will go in. Of course that means you can't use any other USB devices, so for me a better option is to ssh in and control it from another machine if I need USB storage.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2079
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by MrEngman » Sat Jun 16, 2012 2:40 pm
Just as an experiment I now have two different wifi adapters BOTH plugged directly into the Pi's USB ports. An Edimax EW-7811Un and a Micronet SP907NS, both rtl8188cus based. I have ssh'ed into the Pi on both ports and it is working.

With both ports idle checking the voltage on the Pi, TP1-TP2 shows 4.88v, one USB port shows 4.54v and the other 4.52v.

Running the command
Code: Select all
ls -lR /
on both SSH terminals symultaneously and the voltages drop, TP1-TP2 to about 4.83v and the USB ports to about 4.35v although this is using a digital voltmeter so only gives a general idea of voltage as the actual voltage is rather variable in reality.

The voltage out of my PSU is 5.4v, so there is a voltage drop of almost 0.6v across the USB power cable and main fuse F3, and then a further drop of almost 0.5v across the USB fuses.

I have run my Micronet wifi adapter for long periods at voltages as low as 4.2v and it appears very tolerant of the low voltage. However, I cannot speak for the Logitech dongle.

Try it and see what happens I suppose.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by olibanum » Sat Jun 16, 2012 3:16 pm
Montala wrote:Very many thanks to MrEngman for all his hard work on this subject, which I am sure will be appreciated by a lot of members... including myself!

I don't wish to stray too far 'off topic' here, but has anyone who has managed to get one of these devices working successfully done so with the tiny Edimax adapter plugged directly into one of the USB ports on their Raspberry Pi, and with something like a Logitech keyboard/mouse 'dongle' in the other one, without having to use a hub?

This is something I would really love to achieve! :)



Not a Logitech but a xenta wireless kayboard & trackpad worked fine during install without Ethernet. Since then I've been connecting via ssh.
Posts: 20
Joined: Wed Jun 06, 2012 9:11 pm
by jstout » Sat Jun 16, 2012 8:15 pm
Working OK here (Logitech combined keyboard/mouse dongle, Edimax EW-7811Un), and getting much better performance than wired through a network over the mains to the router in the front room.

Early days yet, only just got it working on Squeeze after spending too much time on Wheezy, but very impressed and so thankful for MrEngMan's script!

John
Posts: 9
Joined: Sat Dec 24, 2011 5:33 pm
by Smartybones » Sat Jun 16, 2012 9:55 pm
[quote="Montala"...... with the tiny Edimax adapter plugged directly into one of the USB ports on their Raspberry Pi, and with something like a Logitech keyboard/mouse 'dongle' in the other one, without having to use a hub?

This is something I would really love to achieve! :)[/quote]

the thing is, the RPi usb ports were only ever designed to work a keyboard and mouse. plugging wifi or bluetooth dongles in was never on the cards.

the RPi usb ports were designed for low power devices ie, 100mA or less... most wifi dongles are going to need more than this. If you issue the command

Code: Select all
 sudo lsusb -v |grep MaxPower


it will show how much power the device is requesting to be made available. if you plug in your wifi dongle and it shows it needs more than 100mA then forget it.... It may work initially, but as power requirements alter it will cause problems. My own wifi dongle will work ok for light browsing if I am close to the router, but move away from it, or transfer a large file and it will screw things up. It works a little better on my 4GB sd cards, but my 8GB class10 card wont have any of it.

all this is down to the fact that the "developer release" was hijacked by the great unwashed based on inaccurate media reporting. it should only have been initially sold to developers and people that know what they are doing so that a full public release would have all the tools and instructions ready. what it can and cant do all documented. To many people have been dissapointed with the pi because of what they thought it should be able to do and not about what it CAN do...

Page one of the RPi user guide should say in big red letters that if you want to plug something in other than a mouse or keyboard direct into the RPi then forget it... Use a powered hub.
Posts: 174
Joined: Wed Feb 08, 2012 5:03 pm
by Nburnes » Sun Jun 17, 2012 9:40 am
Well, now I'm randomly having issues. Using the script and even manually installing the driver/firmware, after recently having to wipe my SD from corruption, my adapter refuses to work, let alone even show up, except for under lsusb.

I've been using a Patriot Memory PCUSBW1150, which is under supported on the wiki (as I added it there ~2 weeks ago) I'm confused how I wipe it (SD) re-install same image, use same script and now it refuses to work. Adapter is good as I tested it on my Win7/Ubuntu machine as well as my Win8/Ubuntu netbook. :cry:
Posts: 23
Joined: Fri May 25, 2012 7:00 am
by alexeames » Sun Jun 17, 2012 12:12 pm
Smartybones wrote:the thing is, the RPi usb ports were only ever designed to work a keyboard and mouse. plugging wifi or bluetooth dongles in was never on the cards.

the RPi usb ports were designed for low power devices ie, 100mA or less... most wifi dongles are going to need more than this. If you issue the command

Code: Select all
 sudo lsusb -v |grep MaxPower


it will show how much power the device is requesting to be made available. if you plug in your wifi dongle and it shows it needs more than 100mA then forget it....


Thanks for that. Looks interesting. Actual usage measurements have been done (by me) on this device
in this thread In my situation, it used 100 mA when hammering the internet connection. Your mileage may vary. (I'm not very far from the router, but I think I'm going to do some distance tests.)


Smartybones wrote:Page one of the RPi user guide should say in big red letters that if you want to plug something in other than a mouse or keyboard direct into the RPi then forget it... Use a powered hub.


That's a black and white solution to a grey problem. It works for me, so telling people it doesn't work simply isn't true. You don't need to treat people like idiots. I think you'll find a lot of people on here have just become developers without realising it. And I think that's a good thing. We're being stretched and learning new stuff.

Who's the best person to write donkey-proof instructions? The guy who's got 30 years experience who takes things for granted or the donkey, who's just learned how to do something new? (Subject to peer review in case the new donkey does something stoopid - of course) ;)
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2079
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by alexeames » Sun Jun 17, 2012 12:49 pm
Just to follow up on my last post (it won't let me edit now.)

The Edimax nano is asking for 500 mA to be made available, but in my setup, it only draws 100 mA when downloading an iplayer program at full tilt. Let's not forget though, this was based on measurement of the total current drawn by the Pi before, during and after download. (And calculation of the difference.)

100 mA more was drawn by the system while downloading than when at idle. Some of this additional current would have been used by the processor and storage device, so it's not all down to the Edimax.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2079
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Smartybones » Sun Jun 17, 2012 1:40 pm
alexeames wrote:Just to follow up on my last post (it won't let me edit now.)

The Edimax nano is asking for 500 mA to be made available,


That is another thing.... Plenty of lazy people developing products would sooner just say, "bah, yeah, tell the system I want 500mA, saves me having to actually work out what its requirements actually are...."

adding more to the grey areas, and here's me thinking computers were binary. on or off, black or white white ....
Posts: 174
Joined: Wed Feb 08, 2012 5:03 pm
by alexeames » Sun Jun 17, 2012 1:53 pm
Smartybones wrote:
alexeames wrote:Just to follow up on my last post (it won't let me edit now.)

The Edimax nano is asking for 500 mA to be made available,


That is another thing.... Plenty of lazy people developing products would sooner just say, "bah, yeah, tell the system I want 500mA, saves me having to actually work out what its requirements actually are...."

adding more to the grey areas, and here's me thinking computers were binary. on or off, black or white white ....


If I was at max range, it might need a lot more power though. Who knows? There's an interesting thread in the general section about bridging polyfuses to get more USB power. I'm not likely to do it yet as I don't need to. Interesting nonetheless. :D
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2079
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by mookiedog » Sun Jun 17, 2012 3:11 pm
I ran the lastest script (install-rtl8188cus-20120608.sh). It seemed to run without errors, but still no wireless. When the pi boots, I get the message "8192cu: disagrees about version of symbol module_layout".

I am trying two different dongles, both of which are listed as being compatible with this script/process.

Any help would be appreciated.
User avatar
Posts: 19
Joined: Sun Jun 17, 2012 3:04 pm
Location: Los Gatos Mtns, California
by Montala » Sun Jun 17, 2012 4:25 pm
mookiedog wrote:I ran the lastest script (install-rtl8188cus-20120608.sh). It seemed to run without errors, but still no wireless. When the pi boots, I get the message "8192cu: disagrees about version of symbol module_layout".

I am trying two different dongles, both of which are listed as being compatible with this script/process.

Any help would be appreciated.

It would appear that is not actually the latest script, as there is one (install-rtl8188cus-20120611.sh) which is apparently 3 days newer!

There is also a very detailed 'step by step' guide earlier in this thread, posted by the author (MrEngman) which might help, but I expect that was the one you followed anyway.... I haven't actually carried out the procedure myself yet, but hope to do so very shortly!
User avatar
Posts: 638
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)
by MrEngman » Sun Jun 17, 2012 4:47 pm
mookiedog wrote:I ran the lastest script (install-rtl8188cus-20120608.sh). It seemed to run without errors, but still no wireless. When the pi boots, I get the message "8192cu: disagrees about version of symbol module_layout".

I am trying two different dongles, both of which are listed as being compatible with this script/process.

Any help would be appreciated.

The error you're seeing indicates the version of driver and version of kernel are basically incompatible. So you need to update the driver.

To check the Linux version run the command
Code: Select all
uname -a
Linux raspberrypi 3.1.9+ #122 PREEMPT Sun Jun 17 00:30:41 BST 2012 armv6l
shows the Linux version running is "#122 PREEMPT" on my system.

The latest rpi-update loads a new version of Linux code which stops the wifi working with the older driver. I have just loaded an updated script which can be found on the wiki page..

Look for Micronet SP907NS, 11N Wireless LAN USB Adapter

As you've already run the script you should either manually update the driver to the latest version, or you need to start with a new sd card image and run the script again.

To manually update run the commands
Code: Select all
sudo wget http://dl.dropbox.com/u/80256631/8192cu-20120617.tar.gz
tar -xzf 8192cu-20120617.tar.gz
sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
sudo depmod -a
Hope this helps.


Other code versions are

Driver tar file: 8192cu-20120617.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #122 PREEMPT Sun Jun 17 00:30:41 BST 2012 armv6l GNU/Linux
Driver tar file: 8192cu-20120611.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #110 PREEMPT Wed Jun 13 11:41:58 BST 2012 armv6l GNU/Linux
Linux raspberrypi 3.1.9+ #107 PREEMPT Sun Jun 10 15:57:56 BST 2012 armv6l GNU/Linux
Driver tar file 8192cu-20120607.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #101 PREEMPT Mon Jun 4 17:19:44 BST 2012 armv6l GNU/Linux
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by MrEngman » Sun Jun 17, 2012 5:24 pm
mookiedog wrote:I ran the lastest script (install-rtl8188cus-20120608.sh). It seemed to run without errors, but still no wireless. When the pi boots, I get the message "8192cu: disagrees about version of symbol module_layout".

I am trying two different dongles, both of which are listed as being compatible with this script/process.

Any help would be appreciated.


If you are trying more than one wifi adapter you may have problems. There is a program "udev" which automatically assigns a name wlanX - X being some number, to each wifi adapter. My script expects it to be called wlan0. If udev assigns a name other than wlan0, which it will do if it finds a different adapter, your wifi will not work.

udev saves the information it generates in a file
Code: Select all
/etc/udev/rules.d/70-persistent-net.rules
There are two ways round this problem, both requiring you to edit one or the other of two files.

You can edit
Code: Select all
/etc/udev/rules.d/70-persistent-net.rules
and remove all lines referencing items named wlanX before changing wifi adapter.

Or you can edit
Code: Select all
/etc/network/interfaces
and add an entry for the second wifi adapter. This is probably the best solution as you only need to do this once, not every time you change adapter.

In /etc/network/interfaces there will be an entry consisting of something like
Code: Select all
allow hotplug wlan0

auto wlan0

iface wlan0 inet dhcp
wpa-ssid "NETWORK SSID
wpa-psk "NETWORK PASSWORD
You need to duplicate this text but change references to wlan0 to wlan1. e.g.
Code: Select all
allow hotplug wlan1

auto wlan1

iface wlan1 inet dhcp
wpa-ssid "NETWORK SSID
wpa-psk "NETWORK PASSWORD
Hope this helps.I only noticed this a couple of days ago when I got another wifi adapter and started testing with both.

MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by Nburnes » Sun Jun 17, 2012 7:30 pm
MrEngman wrote:To manually update run the commands
Code: Select all
sudo wget http://dl.dropbox.com/u/80256631/8192cu-20120617.tar.gz
tar -xzf 8192cu-20120617.tar.gz
sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
sudo depmod -a
Hope this helps.


Other code versions are

Driver tar file: 8192cu-20120617.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #122 PREEMPT Sun Jun 17 00:30:41 BST 2012 armv6l GNU/Linux
Driver tar file: 8192cu-20120611.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #110 PREEMPT Wed Jun 13 11:41:58 BST 2012 armv6l GNU/Linux
Linux raspberrypi 3.1.9+ #107 PREEMPT Sun Jun 10 15:57:56 BST 2012 armv6l GNU/Linux
Driver tar file 8192cu-20120607.tar.gz is working with kernel versions:
Code: Select all
Linux raspberrypi 3.1.9+ #101 PREEMPT Mon Jun 4 17:19:44 BST 2012 armv6l GNU/Linux

Too add to this the newest driver also works with
Code: Select all
Linux raspberrypi 3.1.9+ #125 PREEMPT Sun Jun 17 16:09:36 BST 2012 armv6l GNU/Linux


Also, instead of sharing individual links, would it be possible for you to create a share able dropbox folder with this information included per driver? That way users could just go and read what version they may need, then individually grab the others as well. Would help more than having links for each one, IMO.

Something like RTL8188CUS-Pi folder with said drivers inside. :?:
Posts: 23
Joined: Fri May 25, 2012 7:00 am
by MrEngman » Sun Jun 17, 2012 8:53 pm
Nburnes wrote:Too add to this the newest driver also works with
Code: Select all
Linux raspberrypi 3.1.9+ #125 PREEMPT Sun Jun 17 16:09:36 BST 2012 armv6l GNU/Linux
So it does. :)

Also, instead of sharing individual links, would it be possible for you to create a share able dropbox folder with this information included per driver? That way users could just go and read what version they may need, then individually grab the others as well. Would help more than having links for each one, IMO.

Something like RTL8188CUS-Pi folder with said drivers inside. :?:
Doesn't appear to be possible I'm afraid.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by jstout » Sun Jun 17, 2012 9:30 pm
jstout wrote:Working OK here (Logitech combined keyboard/mouse dongle, Edimax EW-7811Un), and getting much better performance than wired through a network over the mains to the router in the front room.
John


Well, seemed OK when I was just in the shell, but running under GUI seems to cause problems. I'm reverting to a powered hub for the moment.

John
Posts: 9
Joined: Sat Dec 24, 2011 5:33 pm
by mookiedog » Mon Jun 18, 2012 12:57 am
My uname was the same as your first example.
Code: Select all
Linux raspberrypi 3.1.9+ #122 PREEMPT Sun Jun 17 00:30:41 BST 2012 armv6l

I ran the manual commands. Now when the machine boots, it spends about 2 minutes printing all kinds of messages about wireless stuff, which is way farther than I have ever gotten before!!
If I wait for the machine to finally get to a login prompt (minutes), then login, I get:
Code: Select all
ping 192.168.1.1
connect: Network is unreachable

I know that my SSID is correct. As far as the network key goes, I used the same 26 digit hex key that I use on all my other devices. Is that the right format for the key?
User avatar
Posts: 19
Joined: Sun Jun 17, 2012 3:04 pm
Location: Los Gatos Mtns, California
by mookiedog » Mon Jun 18, 2012 1:15 am
Maybe another clue: if I do an 'ifdown wlan0' followed by an 'ifup wlan0', I get a couple of DHCPDISCOVER messages, then "No DHCPOFFERS received."
User avatar
Posts: 19
Joined: Sun Jun 17, 2012 3:04 pm
Location: Los Gatos Mtns, California
by mookiedog » Mon Jun 18, 2012 1:50 am
OK, as it turns out, the password needs to be the pass phrase, not the hex version of the same. With a pass-phrase in place, I have wireless network access!
Ping works!
Midori browser takes me places (slowly)!
Life is good.

Many thanks to MrEngman!!
User avatar
Posts: 19
Joined: Sun Jun 17, 2012 3:04 pm
Location: Los Gatos Mtns, California
by derrickcope » Mon Jun 18, 2012 2:06 am
Hi, Linux newbie here. I bought a net-core nw136 wifi dongle in China where I live. when I list usb it shows rtl8188cus. I recopied the image and copied the files as you suggested. dropbox is blocked in China and I don't have a vpn for the rpi so I used the no ethernet connection method. Everything goes fine until it prompts to plugin the wifi dongle and then it stops. When I reboot I get interface file failed and a bunch of other failed warnings. needless to say the wifi doesn't work. I am not sure what to do next. Do I need a different dongle? if so which ones are already supported? Thanks
Posts: 6
Joined: Mon Jun 18, 2012 1:59 am
by texy » Mon Jun 18, 2012 6:03 am
Knowing which image you are using and/or the results of
Code: Select all
uname -a


may help diagnose the problem.

Texy
"2.8inch TFT LCD + Touch screen" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=93&t=65566
50p goes to the Foundation ;-)
Forum Moderator
Forum Moderator
Posts: 2411
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England
by Reider » Mon Jun 18, 2012 8:40 am
Game on, the following quote is re the alpha version of Debian Wheezy, now propagating the beta version......

by asb » 18 Jun 2012 07:48
Everyone, thanks for your help in testing. A new version of the image is now being propagated to the raspberrypi.org download system.

Posts: 318
Joined: 16 Sep 2011 19:16



I don`t know if any drivers and firmware are in place now for the Edimax 7800 Un and other similar hardware but only time will tell. If not then I`m sure someone will find a way to fix it when the OS is in regular use. I`m excited about this, if the beta is anything like the alpha version it's going to be very fast and also take out some of the work in the configuration menu. IE password, resize the SD Card, add SSH, select them all and more then see them added on first boot. Just a shame our WiFi cards aren`t in that list, but that probably wouldn`t be possible.

Steve
Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm
by MrEngman » Mon Jun 18, 2012 11:46 am
derrickcope wrote:Hi, Linux newbie here. I bought a net-core nw136 wifi dongle in China where I live. when I list usb it shows rtl8188cus. I recopied the image and copied the files as you suggested. dropbox is blocked in China and I don't have a vpn for the rpi so I used the no ethernet connection method. Everything goes fine until it prompts to plugin the wifi dongle and then it stops. When I reboot I get interface file failed and a bunch of other failed warnings. needless to say the wifi doesn't work. I am not sure what to do next. Do I need a different dongle? if so which ones are already supported? Thanks


Presumably you are using the Debian6-19-04-21012 image.

Is it stopping after this stage?
Code: Select all
Now plug in the wifi adapter. It should start automatically. Just wait a while for the
wifi adapter LED to start flashing then press any key to continue...
If it is press ctrl-C a couple of times to terminate the script.

Then what does the command
Code: Select all
ifconfig wlan0
show if anything?
Code: Select all
wlan0     Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0  TX bytes:0
If you see something like the above then the driver is installed but there is no network connection. There is no "inet addr:"

Or do you get to here and see the wlan0 data something like the following
Code: Select all
The wifi adapter is now connected.

Check the wlan0 settings. This will show the network IP address assigned to the wifi adapter
and other parameters for the wifi adapter.

wlan0     Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.16.13  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::211:3bff:fe19:1f30/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:49397 errors:0 dropped:50188 overruns:0 frame:0
          TX packets:123 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6563806 (6.2 MiB)  TX bytes:9596 (9.3 KiB)

Press any key to continue...


If you get to here I would suggest that you terminate the script using ctrl-C key press as you may have difficulty downloading some of the additional data needed which will screw up the install. Stopping here will give you a basic setup. To update you will then need to do it manually.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Posts: 1857
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK