FactionOne
Posts: 7
Joined: Tue Mar 18, 2014 11:18 am

[Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi2?

Mon Jun 15, 2015 4:21 pm

Hi All,

As subject, I'm hoping you might be able to help me with a WiFi issue which is slowly driving me daft.

I'm running several Pis, all apart from one connected by trusty old 5e; and they're about as dependable as sunrise. The last one lives in a spot which I can't easily get a cable to, so it connects to a WLAN with an Edimax EW7811Un. Unfortunately, that leads it to be significantly less dependable.

The (well documented [read: discussed]) problem is that every so often the wireless connection drops, and doesn't come back until I do a very ungraceful restart at the mains outlet.

The really frustrating part is that it seems to happen at intervals more random than a computer should be able to manage. I've seen it stay connected for periods in excess of a week; then it'll drop and I'll pull the mains, give it a few seconds, and restore power. When the Pi comes back up, I may be able to contact it over the network for another week, twenty minutes, or anything between. Sometimes it's not contactable immediately after booting, so I'll power-cylce again (or again & again) and eventually communication will be restored for a period.

I get the feeling the problem is caused either by a lack of sufficient power to USB - there's a Telldus Tellstick USB (first version, transmit-only) connected as well as the Edimax wireless adapter - or by the driver for the EW7811 being a bit pants. Though in either case I can't figure out how sometimes it'll work fine for a week, then without anything being discernably different, less than an hour (or not at all until another reboot).

I'm confident the WLAN itself is pretty stable. There's one Cisco (Linksys) E4200 router only a few metres away, and a second acting as an additional AP further away; and other WiFi devices don't seem to lose their connection.

I'd rather remove the cause than simply treat the symptom (with a blunt user-space script to restart the network stack(s) when comms are lost); so I'm considering either replacing the EW7811Un, or perhaps retiring the Pi and replacing it with a Pi2 (with more USB juice); maybe even both. [I'd rather avoid powered hubs as they seem to be a false economy - becoming reliably compatible not far off the price of a replacement Pi, which would give better value for money].

I'd be really grateful for any wisdom the community might be able to offer; mainly on whether or not the EW7811Un tends to exhibit this issue regardless of other factors, and if not, that power's likely the problem (and therefore that a Pi2 might be solution for both USB devices without hubs or 'dirty' scripts).

Most grateful for any advice,

Rob.

goldberg
Posts: 14
Joined: Thu Mar 06, 2014 5:27 pm
Location: Cambridge, UK

Re: [Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi

Mon Jun 15, 2015 6:43 pm

Hi Rob,

Have you seen details of the /etc/modprobe.d fix in a recent post on this subject on raspihub.com here:
http://www.raspihub.com/go/cb378f9e3be8 ... 0aa106f12e

I've also been experiencing this problem over many months with the Edimax EW-7811Un.
One strange observation: my OpenElec Kodi xbmc server running on a B+ with the same Edimax dongle has been running completely reliably for months with never a problem. Other of my Raspberry Pis - particularly the ones running camera motion applications seem to be much more problematical.

However, after reading another post on this forum, I'm trying out an Edimax EW7811UTC with a new driver installed as per these instructions:
viewtopic.php?f=28&t=99268&p=762390&hil ... TC#p762390

After running for several days, this WiFi dongle seems to be more stable, but will only really know if the problem is fixed after a few weeks.....

Matthew

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

Re: [Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi

Mon Jun 15, 2015 7:42 pm

This is a typical wifi issue regardless of the type of wifi adapter. As you suggest it could be a PSU issue or because you have that other device connected as well. Another item to check is the cable connecting your PSU to the Pi. Too long or too thin and this can cause power issues as well as there can be a significant voltage drop in the cable. So even if you have a suitable PSU a poor quality cable can cause power issues as well.

Interference from other wifi devices, e.g mobile phones etc., could possibly cause similar problems.

Personally I have no issues with the EW-7811Un or any of the other wifi adapters I use. They all stay connected whether idle or busy. You could try the following for the EW-7811Un. Generate the file /etc/modprobe.d/8192cu.conf and add the line

Code: Select all

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
This will disable power management and stop it disconnecting from the USB when it is idle.

All my wifi's use dhcp and one other thing I have done is change the IP address lease time to infinite so they don't try requesting new dhcp IP leases from my server. This seems to have improved the reliability of my wifi as previous to changing the lease time I used to get wifi adapters, and not just the EW-7811Un, occasionally dropping connections.


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

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

FactionOne
Posts: 7
Joined: Tue Mar 18, 2014 11:18 am

Re: [Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi

Tue Jun 16, 2015 11:50 am

Thanks very much indeed for your replies.

I hadn't seen the USB suspend part of the tweaks; I've added that to the power management disable now. The last 'different' advice I saw related to using the ifupdown script from wpa_supplicant; that *seemed* to help, but unfortunately about a week later I was back to reboots every few hours so that wasn't the magic bullet it first seemed to be.

I must confess I'd been a little slack on the PSU front - I hooked-up Automaton (the Pi in question) with a 5(.00 nom)V 1500ma one I had knocking about; thinking that should be OK from what I understood to be USB power output specs of the [v1] Pi; but until reading above, I wasn't aware that there can be issues of sensitivity to the cleanliness of the DC in (and that over-spec'ing a bit might also help).

Anyway, I had to hand an [ostensibly] 5.20V <2400ma PSU I'd bought on spec, so I gave that a go. It's far from a pudding of proof, but I could hit the Pi over the WLAN on its first boot, and that remained so over 4 hours later. It had dropped offline before I swapped PSUs, and before that it'd been happening at intervals between 1 & 6 hours since Friday (when an 8 day run came to an end).

I said above that I bought the PSU on spec; it wasn't described as an iPad charger, but when it landed I discovered a fake one of which it very much was manufactured to be (dead giveaway was "Copyright (©) 2012 Corporation, Inc." [sic]) - not one I'm desperately keen to leave plugged-in unattended/overnight (it sees occasional use with a breadboard, and *that's it*). I rooted around some more and found a [genuine] Galaxy Tab charger rated at 5V 2A, so figured I'd have a go at that. As I write, it's up 10h 52m. I know I shouldn't, but I'm thinking of pudding(!) - so much so that I've sent for some on the verified list at eLinux which have both voltage and current headroom [not sure I can name on the forum?], because whether it cures my WiFi headache or not, I'm long enough in the tooth to know full well that PSUs are to computers & electronics what tyres are to a car. Mr Engman above and articles I found about voltage drop on the 5V line with high draw on the USBs served as clear reminders that 'good' power is as important as 'enough' power.

Matthew, being in the same boat (won't be empirically sure for a minimum of eight days, realistically more), I'd be very interested to know how you get on with your replacement adapter in case that proves to be the answer; or indeed perhaps that a combination of both is worth a try. I'll come back to this thread in a week or two to add a [brief, I promise!] reply, hopefully reporting stable operation; fingers crossed you'll be enjoying the same!

Thanks again, and best regards,

Rob.

goldberg
Posts: 14
Joined: Thu Mar 06, 2014 5:27 pm
Location: Cambridge, UK

Re: [Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi

Mon Jun 22, 2015 9:08 pm

Hi Rob,

The replacement Edimax EW7811UTC adaptor is holding up extremely well, with no WiFi problems since I last posted.
The adaptor is accessing a 5GHz wifi channel on my router, and is using a static IP-address.

Meanwhile, after many weeks I have not seen a single wifi problem with my RPi running OpenElec KODI media server with Edimax EW7811Un, accessing a 2.4GHz wifi channel on the same router.

Matthew

FactionOne
Posts: 7
Joined: Tue Mar 18, 2014 11:18 am

Re: [Headless] WiFi dropouts - Bin the EW7811Un/Switch to Pi

Thu Jul 09, 2015 12:24 am

Matthew: Thanks for the update. It seems you're doing better than I, although I thought I'd cracked it...

With the replacement PSUs I'd ordered things were significantly better, but not perfect. I'm planning on fiddling with one some more to see if it can be improved further (severing its mains earth in order to ensure there's no gremlins coming up that way, etc.), but in the meantime I've switched back to the Samsung tablet charger, which has been *near* perfect.

Actually, [for about a fortnight] the only times the Pi went AWOL were when the WLAN went down - if I rebooted the AP the Pi would go offline and stay that way. I figured that points to the driver for the EW-7811Un being less than ideal; so decided I'd bite the bullet and stick a script in cron to deal with times I might be fiddling with the network. That *seemed* to have cracked it, though tonight it's had a bout of flakiness as good as it ever has. I'm not sure what caused it; the APs/router haven't been down, and I've been nowhere near the Pi itself. Anyway, after re-writing my image to the SD card and hurridly reinstating the shell script in cron , it's back online, but I'm pretty sure I've reached a conclusion on the matter...

You can connect a [Raspian] Pi with an EW-7811Un; but you absolutely should not.(!)

If I haven't in a fit of rage put the whole shooting match in my microwave for a few minutes beforehand, I might source an EW-7811UTC and see if I can duplicate your findings. [I do have a Pi Hut wireless adapter I'm tempted to try in it too]

All the best,

Rob.

EDIT: Just a few minutes after writing the above, the Pi's gone offline again; if it was going to, the shell script would've brought it back online by now. The microwave beckons...

Return to “Troubleshooting”