Wifi instability on RPi 0.3-alpha

Raspberry Pi related support

Wifi instability on RPi 0.3-alpha

Postby Stwert » 19 Sep 2014, 02:26

I'm having the hardest time getting wifi working with 0.3 alpha on my new RPi B+. I suppose I could add on to the current 0.3-alpha thread, but I've read through the whole thing a couple times and it seems pretty unwieldy and hard to find info, so hopefully this thread will help others.

I'm using an Edimax 7811Un dongle, although I was trying a TP-Link dongle earlier.

When I have both the ethernet and wifi dongle plugged in, my experience via the UI seems to be:
1) Only Eth0 recognized > Refresh interfaces
2) Both Eth0 and WLAN0 recognized > Input wifi credentials (static IP)
3) No IP Assigned on WLAN0 > select Stored Profile, change security to WPA/WPA2, Connect
4) No network connected (repeat step 3 a few times), shows Connected
5) Check network interfaces, no IP assigned, go around and around in circles

At certain points, sometimes the connection to the Pi will be completely lost (on both Eth0 and Wifi) and I have to hard reboot the Pi.
If I do get the Wifi IP, it will be lost when I turn off the Pi, unplug Eth0, and start it up.

I seem to recall reading somewhere that I can't really manually configure a text file (which I'm a bit lost about) because it won't retain edits. I tried the archlinux guide anyway and got stuck here:
Code: Select all
iw dev wlan0 scan
command failed: No such device (-19)


I do appreciate the great work done with this project. I did get the TP-link dongle working for about a day, and it was fantastic while it lasted. Really hoping I can get this working! Thanks for your help.
Stwert
 
Posts: 42
Joined: 19 Sep 2014, 01:58

Re: Wifi instability on RPi 0.3-alpha

Postby johnbanks » 19 Sep 2014, 16:55

@Stwert ...
I can’t offer any suggestion on your Ethernet connection problem but I too use the Edimax wireless adapter and it is now working fine for me.

I found this on the RPi forum ... it stopped the Edimax losing connection after periods of non-use/overnight.
==========
by MrEngman » Sun Nov 24, 2013 5:47 pm
Try this. Make a file 8192cu.conf in directory /etc/modprobe.d/ with the command

sudo nano /etc/modprobe.d/8192cu.conf

and add the following lines

# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Later explanation by MrEngman ...
I've no idea why it works, other than it interacts directly with the driver, but there appear to be some oddities regarding so called power management. Command iwconfig always shows power management is off regardless. But the 8192cu driver for the EW7811Un is compiled by default with minimum power management enabled, and appears unaffected by the general power management setting, so could drop power after some time but shouldn't turn off, and this is even when power management is reportedly turned off. It could be the distance to the AP may come in to it and when power is reduced the connection could be lost. Just a guess though.
==============================

Adopting a belt & braces approach, I also followed Maurice Svay’s RPi blog suggestion to the ping router every minute by setting up a cron job ....
Do systemctl enable cronie.service
Do systemctl unmask cronie.service
Do systemctl start cronie.service
Do export EDITOR=nano
Do crontab –e and insert following line then save & exit

*/1 * * * * ping -c 1 192.168.0.1
[i](NOTE: substitute your router IP address)[/i]

Now do crontab –l to check that the cron job is there
Now do systemctl status cronie to check that cronie is running

Hope this helps – good luck
johnbanks
 
Posts: 124
Joined: 11 Jun 2014, 00:16

Re: Wifi instability on RPi 0.3-alpha

Postby Stwert » 19 Sep 2014, 18:21

John, thanks very much for your offered solution.
I did come across this information in previous searching and added the conf file right away to disable power management. Unfortunately, that doesn't seem to be the source of this issue.
I'm happy to provide debug information or other info. I'm doubtful that it is actually a 0.3-alpha bug, because others have got the wifi working with the same hardware and software, I think. Wondering if perhaps I have some faulty hardware somewhere? It's hard to know.

To summarize, I'm using Raspberry Pi B+ with Edimax 7811Un and a fresh install of RuneAudio 0.3-alpha with a 8192cu.conf file.

Edit: I should add that there's no spaces in the SSID, since that seems to be something others have had issues with. Finally, I'm trying to get a static IP configured. I will try a DHCP IP to see if I have a different experience.
Stwert
 
Posts: 42
Joined: 19 Sep 2014, 01:58

Re: Wifi instability on RPi 0.3-alpha

Postby cmh714 » 19 Sep 2014, 21:48

yes power management needs to be turned off is my experience on an RA5730 wifi as well. basically if theres no activity it goes to sleep :)
cmh714
 
Posts: 470
Joined: 04 May 2014, 03:06

Re: Wifi instability on RPi 0.3-alpha

Postby johnbanks » 19 Sep 2014, 22:01

@Stwert ...
It could be your lucky day :)
A guy wick has just posted a lengthy step by step diagnostic guide for wifi.
It's in the main 0.3 topic.
Might be worth a try.
PS - I second his comments about an adequate power supply so you might want to try this ...

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

You'll need a voltmeter
johnbanks
 
Posts: 124
Joined: 11 Jun 2014, 00:16

Re: Wifi instability on RPi 0.3-alpha

Postby johnbanks » 19 Sep 2014, 22:12

cmh714 wrote:yes power management needs to be turned off is my experience on an RA5730 wifi as well. basically if theres no activity it goes to sleep :)


@cmh714 ...
Agreed - that's why I passed on the suggestion of setting up a cron job to ping the router every minute - see my post earlier today.
It seems to work - went away for a 2 weeks holiday and left 0.3 alpha powered on. Wifi was still active when I returned.
johnbanks
 
Posts: 124
Joined: 11 Jun 2014, 00:16

Re: Wifi instability on RPi 0.3-alpha

Postby cmh714 » 19 Sep 2014, 22:34

johnbanks wrote:@cmh714 ...
Agreed - that's why I passed on the suggestion of setting up a cron job to ping the router every minute - see my post earlier today.
It seems to work - went away for a 2 weeks holiday and left 0.3 alpha powered on. Wifi was still active when I returned.


Yep, that certainly is another way to "skin the cat" :)
cmh714
 
Posts: 470
Joined: 04 May 2014, 03:06

Re: Wifi instability on RPi 0.3-alpha

Postby Stwert » 19 Sep 2014, 23:23

Thank you again for the input.

Again, I'm fairly sure it's not a power management issue (i.e. going to sleep) because there is no time for it to go to sleep, as the connection is lost in seconds, and I've added the conf file regardless. I will look through the diagnostic steps in the other thread.

Edit: Unfortunately I don't have a voltmeter, so it would be a few days before I can find one and try that diagnostic.
Stwert
 
Posts: 42
Joined: 19 Sep 2014, 01:58

Re: Wifi instability on RPi 0.3-alpha

Postby Stwert » 19 Sep 2014, 23:56

After a long time and several hard reboots where I couldn't access the pi via either Eth0 or WLAN0. I unplugged the wireless adapter and rebooted a couple times, waited for a while and got back into the interface. Then I could check the IP and access the pi via SSH.

So, plugging the Edimax back in and following wick's directions, here's my diagnostics.

Code: Select all
lsusb -v

does recognize the device.
Code: Select all
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

etc.

Code: Select all
dmesg | grep usbcore

gives several lines and then:
Code: Select all
[  210.965152] usbcore: registered new interface driver rtl8192cu
which looks like 210 seconds to recognize the device?

Code: Select all
iw dev

returns nothing. Maybe that's the issue? Seems to be the same idea as what I posted earlier with:
Code: Select all
iw dev wlan0 scan

returning
Code: Select all
command failed: No such device (-19)
Stwert
 
Posts: 42
Joined: 19 Sep 2014, 01:58

Re: Wifi instability on RPi 0.3-alpha

Postby Stwert » 20 Sep 2014, 01:09

So some further information... I started following these directions: http://www.savagehomeautomation.com/pro ... dapte.html

And when I get to the point to enter "ifconfig", it shows that I'm already connected:

Code: Select all
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.14  netmask 255.255.255.0  broadcast 192.168.0.255
        ether (*numbers and such*)  txqueuelen 1000  (Ethernet)
        RX packets 221  bytes 28218 (27.5 KiB)
        RX errors 0  dropped 6  overruns 0  frame 0
        TX packets 288  bytes 47391 (46.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


On the rune audio network page it still shows a red X with WLAN0 and [no IP assigned].

I am using a 5V 2A power adaptor, so I think the power supply shouldn't be an issue, unless there's some faulty hardware somewhere.
Stwert
 
Posts: 42
Joined: 19 Sep 2014, 01:58

support RuneAudio Donate with PayPal

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 16 guests