texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Tue Jun 19, 2012 9:35 pm

Didn't get much time to play tonight what with the footy on and that but first impressions are that it seems unstable. Once or twice when I rebooted with controlled shutdown -r it hung during the wifi init stage. Then once it had grabbed an ip and I started up x and went to the pi website, the blue led stayed on and it lost connection.
Maybe I didn't load the right script or something. Is there a command to check the driver version?
Obviously I've got the wheezy kernel, 125 I think it is.
Might need to reimage and try again.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Tue Jun 19, 2012 11:02 pm

texy wrote:Didn't get much time to play tonight what with the footy on and that but first impressions are that it seems unstable. Once or twice when I rebooted with controlled shutdown -r it hung during the wifi init stage. Then once it had grabbed an ip and I started up x and went to the pi website, the blue led stayed on and it lost connection.
Maybe I didn't load the right script or something. Is there a command to check the driver version?
Obviously I've got the wheezy kernel, 125 I think it is.
Might need to reimage and try again.
Texy
I see it get stuck sometimes for about 30secs. when booting at "usbcore: registered new interface driver rtl8192cu" but it always starts up eventually.

When X is running the wifi LED behaves very oddly but so does X. It doesn't flash continually and gets stuck either off or on for long periods of time but I don't see the connection being lost. I have another machine on my network continually pinging the Pi and the Pi is continually responding. Response times are pretty awful somewhere between 8ms and 200ms and I've seen "request time out" 3 or 4 times in the last 15 minutes. The same machine pinging my server gets response times of 4-5ms.

Anyway my mouse pointer has now disappeared so need to sort that out and close X so I can get back to a decent screen - text only ;) Looks like the keyboard is down as well. They are both on a hub and the wifi is plugged directly into the Pi. Is this a usb problem then. And is it affecting the wifi?

As far as the driver version is concerned if the wifi is working sometimes then you have the right driver. It won't work at all with the wrong one. Guess there may be a way to find the installed driver version but I don't know off hand.

Looks like X is hung just going to try and SSH in to see if I can get some control back. Keyboard and mouse are hung along with X but the wifi is still responding to pings - so what about that then :D
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

Reider
Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 1:59 am

Just tried to set up the Edimax 7811 in Wheezy and initially failed. Wheezy has been keeping in with the settings from my router, which restrict that Mac address to 192.168.0.137. So I didn`t notice It rebooted and changed to 192.168.0.101 for some reason. Consequently Putty failed, so keep an eye out for that one.

It's now working here but I changed the wired and the WiFi connections both to STATIC and checked them independently of each other as well as both connected at the same time. All well and good here for me. Thanks all, especially MrEngman, you worked a blinder and very very quickly. Give Netsurf a try as a browser folks, it appears quite fast and responsive even on WiFi.....

Thanks again,

Steve

darkwombat
Posts: 4
Joined: Wed Jun 20, 2012 3:18 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 3:20 am

Just tested using Debian Wheezy Beta and the new script on a MicroNext MN-WD552B as supplied by Element14.

Works perfectly.

Thanks MrEngman

zedin
Posts: 38
Joined: Tue Oct 18, 2011 1:20 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 3:41 am

I think the script sort of worked for me. I just put on the wheezy distribution and put the script into my /boot folder. It appeared to run just fine and rebooted the Pi. I changed my /etc/network/interfaces file to use WEP instead of WPA but cannot seem to ever connect. I think it might be a DHCP setting or something since when I restart the network it seems to have trouble connecting. I will try to get the specifics but the fact that it was showing my mask as 255.255.255.255 leads me to think something fubared. Even with my router setup doing DHCP is there a way to change the network settings on the Pi to force it to see the wireless?

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 8:29 pm

Response times are pretty awful somewhere between 8ms and 200ms and I've seen "request time out" 3 or 4 times in the last 15 minutes. The same machine pinging my server gets response times of 4-5ms.
I have a Belkin N150 Surf http://www.amazon.com/Belkin-Micro-Wire ... B005HO1UHQ (according to this page http://wiki.debian.org/rtl819x the chipset is a Realtek RTL8188CUS) connected directly to the USB port of the rpi (not thru a powered hub) along with a Logitech MK250 cordless keyboard and mouse USB radio receiver.
Pinging from wireless computer to router: average of 1.5ms
Pinging from wireless computer to rpi: varies all over the place from 7ms to 180ms or more
Pinging from rpi to router: average between 5 and 6ms

Now the funny bit, while the rpi is pinging the router, pinging from the wireless computer to the rpi gives me a relatively stable value of 6ms and floats only sometimes between 4 and 10ms.

As soon as I stop the rpi pinging the router, the values from the wireless computer to the rpi go back to the previous awful and all over the place.

Can someone else confirm this?

EDIT: If it matter, below is the result of iwconfig for wlan0
wlan0 IEEE 802.11bgn ESSID:"ZON-2230" Nickname:"<[email protected]>"
Mode:Managed Frequency:2.447 GHz Access Point: 00:05:CA:79:22:38
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=94/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Last edited by sjfaustino on Wed Jun 20, 2012 8:44 pm, edited 1 time in total.

Reider
Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 8:43 pm

zedin wrote:I think the script sort of worked for me. I just put on the wheezy distribution and put the script into my /boot folder. It appeared to run just fine and rebooted the Pi. I changed my /etc/network/interfaces file to use WEP instead of WPA but cannot seem to ever connect. I think it might be a DHCP setting or something since when I restart the network it seems to have trouble connecting. I will try to get the specifics but the fact that it was showing my mask as 255.255.255.255 leads me to think something fubared. Even with my router setup doing DHCP is there a way to change the network settings on the Pi to force it to see the wireless?
I thought I saw something about changes that need to be made for WEP. so I went looking, not too far and......
To get a Micronet SP907NS adaptor working with a WEP (not WPA) enabled wireless network, I had to run the script as per the instructions, then, when the adaptor would not get a DHCP address (because it was not connected to the access point) Ctrl-C to quit the script and edit /etc/network/interfaces and replace:

wpa-ssid "YourSSID"
wpa-psk "YourPassword"

with:

wireless-essid YourSSID
wireless-key YourPassword

Note there are no quotation marks used in the WEP version. The adaptor will not connect to the AP with the quotes in place.

'Hope that helps others.
Steve

zedin
Posts: 38
Joined: Tue Oct 18, 2011 1:20 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jun 20, 2012 8:47 pm

Reider wrote:
I thought I saw something about changes that need to be made for WEP. so I went looking, not too far and......
To get a Micronet SP907NS adaptor working with a WEP (not WPA) enabled wireless network, I had to run the script as per the instructions, then, when the adaptor would not get a DHCP address (because it was not connected to the access point) Ctrl-C to quit the script and edit /etc/network/interfaces and replace:

wpa-ssid "YourSSID"
wpa-psk "YourPassword"

with:

wireless-essid YourSSID
wireless-key YourPassword

Note there are no quotation marks used in the WEP version. The adaptor will not connect to the AP with the quotes in place.

'Hope that helps others.
Steve
Yeah.. I already did that part.. I think I might just switch my home network over to WPA anyway and make it easier. I was just trying to figure out the ins and outs for setting up the network connection but was getting stuck.

joefly
Posts: 64
Joined: Thu May 31, 2012 4:10 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 4:17 am

Hi Guys, Having hell of a time as I can not get any wifi dongles to work, so I am following the instruction posted here with Edimax 781UN and I have tried numerous installs following the instructions

everything seems to go fine, at the rpi-update i get the error

Code: Select all

/opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
So I tried following the error correction here but it does not do anything.

my dongle's blue light is not on,

i did iwconfig and lsusb. both show it to be there,

So now I am at a lost as to what next to do to debug..

Any suggestions?

Nburnes
Posts: 23
Joined: Fri May 25, 2012 7:00 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 4:25 am

joefly wrote:Hi Guys, Having hell of a time as I can not get any wifi dongles to work, so I am following the instruction posted here with Edimax 781UN and I have tried numerous installs following the instructions

everything seems to go fine, at the rpi-update i get the error

Code: Select all

/opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
So I tried following the error correction here but it does not do anything.

my dongle's blue light is not on,

i did iwconfig and lsusb. both show it to be there,

So now I am at a lost as to what next to do to debug..

Any suggestions?
Tried this? http://elinux.org/RPi_edimax_EW-7811Un

joefly
Posts: 64
Joined: Thu May 31, 2012 4:10 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 5:08 am

ok, still frustrated but figured out that the wifi dongle would basically not work with my keyboard. The wifi would lock up expectedly when one of my keyboards is plugged in.

I tried just booting with not keyboard or mouse and just wifi dongle on the rpi, but seems like not enough power on rpi to power it. So I use a 7 port hub with 2.8A psu, and it seems to work only without the keyboard, I know this as in the numerous combinations, I got it to work with one of my keyboards but then mouse would not work or something. So I know the dongle works as I got the google page up, then it freezes. So I reboot and try various mouse, keyboard, wifi combo. Everytime just wifi is in, the blue flickers as if it is connected but as soon as plug in a mouse/ typically my keyboard the blue led seems to go off or stops blinking.

Any advice?

It is late so I will try tomorrow to get some voltage measurements and report back..

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 6:35 am

Still sounds like power issues, although not necessarily the actual PSU, which if the 2.8A rating is accuarate, is plenty good enough for the job.
Have you tried another usb cable - the one that feeds the power to the pi?
Also can you try to isolate the +5v line in the cable that connects the hub to one of the pi's usb ports?

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

XavM
Posts: 35
Joined: Thu May 31, 2012 11:29 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 9:29 am

@MrEngman : Thank you for the help you give us;
I have been using your scripts since the beginning, and they make things so much easy with those RealTek micro dongle we are a lot to have.

Did you notice that the dongle enter and leave "power save mode" really often (10 times or more a minute)
Jun 21 11:16:53 raspberrypi kernel: [ 167.069526] rtw_set_ps_mode(): Enter 802.11 power save mode...
Jun 21 11:16:53 raspberrypi kernel: [ 167.071987] rtl8192c_dm_RF_Saving(): RF_Normal
Jun 21 11:16:53 raspberrypi kernel: [ 167.072017] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
Jun 21 11:16:55 raspberrypi kernel: [ 169.069540] rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
Jun 21 11:16:55 raspberrypi kernel: [ 169.069773] rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0
Jun 21 11:16:57 raspberrypi kernel: [ 171.069422] rtw_set_ps_mode(): Enter 802.11 power save mode...
Jun 21 11:16:57 raspberrypi kernel: [ 171.069465] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
Is this normal ?

I used what i think is your last script : http://www.raspberrypi.org/phpBB3/viewt ... 38#p103838

Lorian
Posts: 112
Joined: Sun Mar 11, 2012 10:09 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 10:24 am

It's normal if the Pi is being used at the time (like typing on a SSH connection).

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 11:28 am

XavM wrote:@MrEngman : Thank you for the help you give us;
I have been using your scripts since the beginning, and they make things so much easy with those RealTek micro dongle we are a lot to have.

Did you notice that the dongle enter and leave "power save mode" really often (10 times or more a minute)
Jun 21 11:16:53 raspberrypi kernel: [ 167.069526] rtw_set_ps_mode(): Enter 802.11 power save mode...
Jun 21 11:16:53 raspberrypi kernel: [ 167.071987] rtl8192c_dm_RF_Saving(): RF_Normal
Jun 21 11:16:53 raspberrypi kernel: [ 167.072017] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
Jun 21 11:16:55 raspberrypi kernel: [ 169.069540] rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
Jun 21 11:16:55 raspberrypi kernel: [ 169.069773] rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0
Jun 21 11:16:57 raspberrypi kernel: [ 171.069422] rtw_set_ps_mode(): Enter 802.11 power save mode...
Jun 21 11:16:57 raspberrypi kernel: [ 171.069465] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
Is this normal ?

I used what i think is your last script : http://www.raspberrypi.org/phpBB3/viewt ... 38#p103838
I see this a lot. Especially during booting and if I run dmesg.

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

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

basst85
Posts: 6
Joined: Sat Jun 02, 2012 9:57 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 1:33 pm

MrEngman wrote:
alexeames wrote:so we don't need the script with wheezy then? Sorry, I'm a bit confused :? But downloading wheezy as I type. 8-)

(Edit: Ah I read back a few posts and see there is a new script - gonna try that out)
That's for the alpha. Look here for the script for the beta. Previous post as it happens.

MrEngman
Your setup script works perfectly. Thanks!

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 1:40 pm

With which distro out of interest ?
T.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

joefly
Posts: 64
Joined: Thu May 31, 2012 4:10 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 4:14 pm

texy wrote:Still sounds like power issues, although not necessarily the actual PSU, which if the 2.8A rating is accuarate, is plenty good enough for the job.
Have you tried another usb cable - the one that feeds the power to the pi?
Also can you try to isolate the +5v line in the cable that connects the hub to one of the pi's usb ports?

Texy
hi Texty
You are right, the PSU for hub is fine, I measured it when I plug everything in and out it stays above 5.1V so it does not seem to be the problem.

I have consistently confirmed it is somehow conflicting with my Mouse/Keyboard combo (i tried various ones) No matter which one of Mouse/Key with my wifi, one of the items fail or locks up until I unplug my mouse or keyboard and then the wifi works again. I confirm this also by booting up with just wifi and no mouse/key. And the boot just flies thru, but if I boot with all three plugged in, i get hung up on USB read errors.

Sometimes I am able to get all three to work in terminal after booting, confirmed by pinging www.google.com but with I got to GUI with startx, again one of the three accessories will fail.

I even switched Rpi as I have an extra one thinking it is board problem, It does not solve it.

can anyboy thinnk of why USB accessories are conflicting with each other? OH i also tried to do without using hub, same result.

TEXTY;; I tried various cables, did not seem to help. What do you mean by isolating the cable between Rpi and hub?

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 5:28 pm

See this thread. Obviously you hub may be different but the principle is the same.
T.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Lorian
Posts: 112
Joined: Sun Mar 11, 2012 10:09 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 5:31 pm

You can get rid of the power saving messages on boot and on the console by adding the single word quiet at the end of /boot/cmdline.txt

Like

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=noop rootwait quiet

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 6:30 pm

texy wrote:See this thread. Obviously you hub may be different but the principle is the same.
T.
http://www.raspberrypi.org/phpBB3/viewt ... =28&t=8926

Oooopppps forgot the link.
T.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

joefly
Posts: 64
Joined: Thu May 31, 2012 4:10 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 7:29 pm

texy, Thank you for helping along the way. The last suggestion was good and I thought it would be the solution as I noticed it was back-powering from the hub so I cut the red wire on the USB cord. I thought that would be the solution as it made sense. But unfortunately it was not, so in frustration, I started searching my parts drawer for another USB hub, found one that must be like 15 years old, el cheapo and it worked!!

So finally all the problem was due to the hub, I confirmed this as all of the sudden my problem of communicating with the Arduino was also solved with same change of USB hub. So I am a happy camper now as finally got my project up and running a WIFI arduino running python script!!

Strange, I figure the USB HUB is just a dumb device but apparently they are differences.

Thanks for the help along the way to keep me motivated to solve the problem

Lorian
Posts: 112
Joined: Sun Mar 11, 2012 10:09 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jun 21, 2012 9:18 pm

To turn the verbose wifi kenel debug messages off, so they don't got to console , dmesg or the kernel log, there is a symbol to undefine before compiling. This works on my driver, if you are using a different one then the file names and directories might change obviously.

Code: Select all

cd driver/rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404
cp autoconf_rtl8192c_usb_linux.h autoconf_rtl8192c_usb_linux.h.bu
sed 's/#define CONFIG_DEBUG_RTL819X/\/\/#define CONFIG_DEBUG_RTL819X/' autoconf_rtl8192c_usb_linux.h.bu > autoconf_rtl8192c_usb_linux.h
Then rebuild the driver. The last line of code might get split over 2 lines on the forum.
Keep in mind if you use their install.sh script to compile it re-unpacks the driver directory and runs the setup script every time it runs so you'd want to stop that happening or this change gets over-written. Not a problem if you just make from the drivers subdir.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Jun 22, 2012 6:23 am

Are you able to supply your driver, out of interest?

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Pitel
Posts: 25
Joined: Fri Jun 22, 2012 1:37 pm
Location: Brno, CZE
Contact: Website Facebook Google+ Skype Twitter YouTube

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Jun 22, 2012 1:47 pm

I am running latest wheezy debian beta, fully updated using apt-get. I am also using the rpi-update utility.

I used your automated script from 20120617 (but I commented out the apt changes, custom dhcp client and rpi-config, since it breaks the wheezy repo, dhcp is working fine and I use rpi-update by myself). After that I connected my dongle (EDUP EP-N8508) and rebooted. The module loaded succesfuly during boot.

But I can't see any networks! During boot, dhcpdiscover on wlan0 failed, and `iwlist wlan0 scan` returns no results. Thers hould be at least 5 visible networks and my Pi is just about 2 meters away from my AP.

Any idea what might be wrong?

Return to “Beginners”