c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

WiFi cuts out after a few hours

Fri Aug 31, 2012 8:04 am

I am using Raspbian (16th August) and a D-Link AirPlus G DWL-G122 (rev. C) Wi-Fi adapter, which is shown as working on the Wiki.

When I was setting up the Pi next to my TV, I had no problems at all with the WiFi connection, but now that I have moved it into the cupboard where it will be living the WiFi cuts out after a few hours of use. The signal isn't as strong where it is, but it still manages to initially connect fine. After some time, the LEDs on the adapter go out and it won't reconnect without a reboot (very difficult without network connectivity as it's running headless).

I have shorted the polyfuses, as the max load of the adapter is 300mA. I have yet to try a different adapter, as I only have the one at the moment.

Has anyone else had this problem?

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: WiFi cuts out after a few hours

Fri Aug 31, 2012 8:30 am

It sounds like you have power problems. WiFi devices use a lot of juice, especially if they are far from the Access Point.

If possible, check the voltage on the RPi, see instructions at
http://elinux.org/R-Pi_Troubleshooting# ... r_problems

You didn't say what power supply you are using, but to drive the RPi and a WiFi device with shorted polyfuses, you will need at least a 1A (1000mA) supply and a high-quality power cable.

c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

Re: WiFi cuts out after a few hours

Fri Aug 31, 2012 9:18 am

I'm using a 1A iPhone charger. I thought about power being an issue - I'll check the voltage tonight when I'm home.

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

Re: WiFi cuts out after a few hours

Fri Aug 31, 2012 10:53 am

I see you are not the only one with this problem; see here:
http://www.raspberrypi.org/phpBB3/viewt ... 26&t=16054

I am also running headless, but have not run the wifi long enough to have this happen to me. I will have to turn off/on my router and see what happens when I get a chance. This will be a problem for me as well, since I will not have access to the pi to re-seat the dongle when it happens, so I am very interested in a solution.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: WiFi cuts out after a few hours

Fri Aug 31, 2012 11:40 am

I had those issues as well.
I edited the /etc/network/interfaces file and added a line to the wlanx section:
wireless-power off.
Not sure if it was that or maybe a kernel update, but the problems went away.
Even with the usb polyfuses shorted, you still have your main polyfuse that trips around 1.2 - 1.3 Amps. If your wifi stick uses to much current, the voltage between TP1 and TP2 might lower causing
issues as well. (You can measure that voltage to figure out if it's your case.)

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

Re: WiFi cuts out after a few hours

Fri Aug 31, 2012 11:57 am

obcd wrote:I had those issues as well.
I edited the /etc/network/interfaces file and added a line to the wlanx section:
wireless-power off.
Not sure if it was that or maybe a kernel update, but the problems went away.
Even with the usb polyfuses shorted, you still have your main polyfuse that trips around 1.2 - 1.3 Amps. If your wifi stick uses to much current, the voltage between TP1 and TP2 might lower causing
issues as well. (You can measure that voltage to figure out if it's your case.)
Nice find, I was wondering how to turn off power-saving. I can see where that can become an issue, and my Airlink indeed has power saving capabilities. It would not solve turning off the router or a weak signal though, if that turns out to be a different problem.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

Re: WiFi cuts out after a few hours

Sat Sep 01, 2012 8:23 am

Last night I bought a powered hub which completely solved the issue. The Wifi has now been stable for 12 hours.

Also, the hub is back-powering the Pi through the USB A port. This is possible because of the shorted poly fuses. I'll post up a photo of the setup later.

c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

Re: WiFi cuts out after a few hours

Sat Sep 01, 2012 8:08 pm

Ok it turns out it wasn't fixed after all. After about 12 hours use it cut out again, despite being connected to a powered hub. I think I can now rule out a power issue.

I have dismantled the wifi dongle and noticed an antenna connector on the board, like those used in laptops, so I'll try plugging a laptop antenna in to see if that helps.

c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

Re: WiFi cuts out after a few hours

Sat Sep 01, 2012 9:40 pm

I can't figure out how to edit posts, so here is the relevant /var/log/syslog from this morning when the link went down and never came back up.

Code: Select all

Sep  1 09:12:38 raspberrypi kernel: [53413.025993] ieee80211 phy0: wlan0: No probe response from AP 00:26:f2:80:99:7a after 500ms, disconnecting.
Sep  1 09:12:38 raspberrypi kernel: [53413.062751] cfg80211: Calling CRDA to update world regulatory domain
Sep  1 09:12:38 raspberrypi wpa_supplicant[1035]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:26:f2:80:99:7a reason=4
Sep  1 09:12:40 raspberrypi ifplugd(wlan0)[1047]: Link beat lost.
Sep  1 09:12:50 raspberrypi ifplugd(wlan0)[1047]: Executing '/etc/ifplugd/ifplugd.action wlan0 down'.
Sep  1 09:12:52 raspberrypi wpa_supplicant[1035]: wlan0: CTRL-EVENT-TERMINATING - signal 15 received
Sep  1 09:12:52 raspberrypi ifplugd(wlan0)[1047]: Program executed successfully.
Sep  1 09:12:54 raspberrypi ntpd[2038]: Deleting interface #2 wlan0, 192.168.1.3#123, interface stats: received=78, sent=672, dropped=0, active_time=53386 secs
Sep  1 09:12:54 raspberrypi ntpd[2038]: 195.83.66.158 interface 192.168.1.3 -> (none)
Sep  1 09:12:54 raspberrypi ntpd[2038]: 178.238.46.153 interface 192.168.1.3 -> (none)
Sep  1 09:12:54 raspberrypi ntpd[2038]: 193.225.118.162 interface 192.168.1.3 -> (none)
Sep  1 09:12:54 raspberrypi ntpd[2038]: 217.174.209.121 interface 192.168.1.3 -> (none)
Sep  1 09:12:54 raspberrypi ntpd[2038]: peers refreshed
Sep  1 09:15:48 raspberrypi kernel: [53603.298500] usb 1-1.3.3: USB disconnect, device number 5
Sep  1 09:15:49 raspberrypi ifplugd(wlan0)[1047]: Exiting.
Sep  1 09:15:49 raspberrypi kernel: [53604.540535] usb 1-1.3: USB disconnect, device number 4
Sep  1 09:15:49 raspberrypi kernel: [53604.783922] usb 1-1.3: new high speed USB device number 6 using dwc_otg
Sep  1 09:15:50 raspberrypi kernel: [53604.885648] usb 1-1.3: New USB device found, idVendor=05e3, idProduct=0608
Sep  1 09:15:50 raspberrypi kernel: [53604.885688] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Sep  1 09:15:50 raspberrypi kernel: [53604.885706] usb 1-1.3: Product: USB2.0 Hub
Sep  1 09:15:50 raspberrypi kernel: [53604.887016] hub 1-1.3:1.0: USB hub found
Sep  1 09:15:50 raspberrypi kernel: [53604.887531] hub 1-1.3:1.0: 4 ports detected
Sep  1 09:15:50 raspberrypi kernel: [53605.585130] usb 1-1.3: USB disconnect, device number 6
Sep  1 09:15:51 raspberrypi kernel: [53605.943911] usb 1-1.3: new high speed USB device number 7 using dwc_otg
Sep  1 09:15:51 raspberrypi kernel: [53606.045776] usb 1-1.3: New USB device found, idVendor=05e3, idProduct=0608
Sep  1 09:15:51 raspberrypi kernel: [53606.045816] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Sep  1 09:15:51 raspberrypi kernel: [53606.045835] usb 1-1.3: Product: USB2.0 Hub
Sep  1 09:15:51 raspberrypi kernel: [53606.047139] hub 1-1.3:1.0: USB hub found
Sep  1 09:15:51 raspberrypi kernel: [53606.047670] hub 1-1.3:1.0: 4 ports detected
Sep  1 09:15:57 raspberrypi kernel: [53612.014363] usb 1-1.3.4: new high speed USB device number 8 using dwc_otg
Sep  1 09:15:57 raspberrypi kernel: [53612.250833] usb 1-1.3.4: New USB device found, idVendor=07d1, idProduct=3c03
Sep  1 09:15:57 raspberrypi kernel: [53612.250875] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep  1 09:15:57 raspberrypi kernel: [53612.250894] usb 1-1.3.4: Product: 802.11 bg WLAN
Sep  1 09:15:57 raspberrypi kernel: [53612.250908] usb 1-1.3.4: Manufacturer: Ralink
Sep  1 09:15:57 raspberrypi kernel: [53612.334360] usb 1-1.3.4: reset high speed USB device number 8 using dwc_otg
Sep  1 09:15:57 raspberrypi kernel: [53612.759099] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
Sep  1 09:15:57 raspberrypi kernel: [53612.762142] Registered led device: rt73usb-phy1::radio
Sep  1 09:15:57 raspberrypi kernel: [53612.762664] Registered led device: rt73usb-phy1::assoc
Sep  1 09:15:57 raspberrypi kernel: [53612.763176] Registered led device: rt73usb-phy1::quality
Sep  1 09:15:58 raspberrypi ifplugd(wlan0)[3770]: ifplugd 0.28 initializing.
Sep  1 09:15:58 raspberrypi ifplugd(wlan0)[3770]: Using interface wlan0/00:24:01:14:43:D5 with driver <rt73usb> (version: 3.1.9+)
Sep  1 09:15:58 raspberrypi ifplugd(wlan0)[3770]: Using detection mode: SIOCETHTOOL
Sep  1 09:15:58 raspberrypi ifplugd(wlan0)[3770]: Initialization complete, link beat not detected.
Sep  1 09:26:43 raspberrypi kernel: [54258.181619] usb 1-1.3.4: USB disconnect, device number 8
Sep  1 09:26:43 raspberrypi ifplugd(wlan0)[3770]: Exiting.
It looks like the whole USB system is dropping, as it is losing the hub too by the looks of things. The only devices connected are a USB hub and the Wifi dongle. Here is the lsusb output:

Code: Select all

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 005: ID 07d1:3c03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) (Ralink RT2571W)

c.cam108
Posts: 34
Joined: Thu Aug 16, 2012 9:17 pm

Re: WiFi cuts out after a few hours

Wed Sep 26, 2012 2:31 pm

After trying out a powered USB hub and a new WiFi adapter (Belkin 54g), this is still happening. After being on for a few hours the WiFi stops working.

Has anyone any ideas? It's making hosting a headless web server very difficult!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25439
Joined: Sat Jul 30, 2011 7:41 pm

Re: WiFi cuts out after a few hours

Wed Sep 26, 2012 2:36 pm

Have you been keeping an eye on the elephant thread, there may be some USB options that might help. Also worth updating to the latest distro which has a number of USB improvements.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

halfabiscuit
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am

Re: WiFi cuts out after a few hours

Wed Sep 26, 2012 3:51 pm

Yes, I have seen a similar thing - I had a Belkin F5D7050 USB adapter and it would work for a bit and then die. I tried an Edimax 711UTN and it works fine for days at a time. Both connected directly to the pi - no powered USB hub involved.
I do have another problem though - I am using the pi as an ethernet to wifi bridge so that I can connect to a NAS device wirelessly. I am backing up large amounts of data using rsync from a remote server. It seems to work for a bit and then the wireless dies after a couple of hours. I am running the pi headless so I can't see what the problem is so I just have to reboot. I don't think this is the wireless dying like yours is though because if I don't start the backup it stays up for days at a time quite happily.

pylover
Posts: 3
Joined: Mon Aug 11, 2014 6:05 pm

Re: WiFi cuts out after a few hours

Thu Jan 08, 2015 3:50 pm

After using powered hub, the cut-off problem still exists.
But after replacing the power-supplies , everything working good.

Use an accurate voltmeter to measure the provided USB voltage. it must be exactly 5v. some power supplies + long cable has a drop-out voltage of 300mv.

Just replace your power-supply with a good one (2A, exactly 5V).

User avatar
DougieLawson
Posts: 37674
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: WiFi cuts out after a few hours

Thu Jan 08, 2015 5:52 pm

For the Edimax use sudo nano /etc/modprobe.d/8192cu.conf create that file with

Code: Select all

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
save it, reboot and your Edimax won't go to sleep.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”