12

I am using a Model B 256MB Pi with an Edimax EW-7711UTn USB WiFi adaptor. After some hours, the WiFi connection begins to drop and be restarted. Until it stops working completely. This is what I see in /var/log/messages:

Mar  9 20:39:29 raspberrypi kernel: [ 9353.773167] cfg80211: Calling CRDA to update world regulatory domain
Mar  9 20:39:29 raspberrypi wpa_action: WPA_IFACE=wlan0 WPA_ACTION=DISCONNECTED
Mar  9 20:39:29 raspberrypi wpa_action: WPA_ID=0 WPA_ID_STR= WPA_CTRL_DIR=/var/run/wpa_supplicant
Mar  9 20:39:29 raspberrypi wpa_action: ifdown wlan0
Mar  9 20:39:30 raspberrypi wpa_action: removing sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
Mar  9 20:39:33 raspberrypi kernel: [ 9357.478605] wlan0: authenticate with 30:46:9a:54:6f:3d
Mar  9 20:39:33 raspberrypi kernel: [ 9357.624628] wlan0: send auth to xxx (try 1/3)
Mar  9 20:39:33 raspberrypi kernel: [ 9357.626510] wlan0: authenticated
Mar  9 20:39:33 raspberrypi kernel: [ 9357.703189] wlan0: associate with xxx (try 1/3)
Mar  9 20:39:33 raspberrypi kernel: [ 9357.707045] wlan0: RX AssocResp from 30:46:9a:54:6f:3d (capab=0x411 status=0 aid=2)
Mar  9 20:39:33 raspberrypi kernel: [ 9357.722534] wlan0: associated
Mar  9 20:39:33 raspberrypi wpa_action: WPA_IFACE=wlan0 WPA_ACTION=CONNECTED
Mar  9 20:39:33 raspberrypi wpa_action: WPA_ID=0 WPA_ID_STR= WPA_CTRL_DIR=/var/run/wpa_supplicant
Mar  9 20:39:33 raspberrypi wpa_action: ifup wlan0=default
Mar  9 20:39:40 raspberrypi wpa_action: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
Mar  9 20:39:40 raspberrypi wpa_action: bssid=xxx
Mar  9 20:39:40 raspberrypi wpa_action: ssid=xxx
Mar  9 20:39:40 raspberrypi wpa_action: id=0
Mar  9 20:39:40 raspberrypi wpa_action: mode=station
Mar  9 20:39:40 raspberrypi wpa_action: pairwise_cipher=CCMP
Mar  9 20:39:40 raspberrypi wpa_action: group_cipher=CCMP
Mar  9 20:39:40 raspberrypi wpa_action: key_mgmt=WPA2-PSK
Mar  9 20:39:40 raspberrypi wpa_action: wpa_state=COMPLETED
Mar  9 20:39:40 raspberrypi wpa_action: ip_address=xxx
Mar  9 20:39:40 raspberrypi wpa_action: address=xxx

And dmesg sometimes tells me:

[20014.112395] wlan0: deauthenticating from xxx by local choice (reason=3)

wpa processes running are:

 1872 ?        Ss     0:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -W -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
 2010 ?        Ss     0:00 /sbin/wpa_cli -B -P /var/run/wpa_action.wlan0.pid -i wlan0 -p /var/run/wpa_supplicant -a /sbin/wpa_action

Does anyone else have these problems, and how can I fix those?

Since many people seem to have problems with insufficient power supplies: My RasPi runs on a 1.2A 5V supply and has a 3.8A 5V powered USB hub attached to it. I now detached all other devices from the powered hub and connected the Edimax to it, maybe this will help.

Update: No, this time it took only a few minutes for the WiFi to become unresponsive.

Update 2: I still have problems, right now I noticed that the connection can be re-started using ifdown and ifup, but I keep getting more and more of these messages:

Mar 22 19:11:59 raspberrypi kernel: [215435.967714] cfg80211: Calling CRDA to update world regulatory domain
Mar 22 19:12:01 raspberrypi kernel: [215437.948971] wlan0: authenticate with XXXXXX
Mar 22 19:12:02 raspberrypi kernel: [215438.087245] wlan0: send auth to XXXXXX (try 1/3)
Mar 22 19:12:02 raspberrypi kernel: [215438.089006] wlan0: authenticated
Mar 22 19:12:02 raspberrypi kernel: [215438.165765] wlan0: associate with XXXXXX (try 1/3)
Mar 22 19:12:02 raspberrypi kernel: [215438.169604] wlan0: RX AssocResp from XXXXXX (capab=0x411 status=0 aid=1)
Mar 22 19:12:02 raspberrypi kernel: [215438.185759] wlan0: associated

This happens in shorter and shorter timespans until I reboot. Then it's ok again for a day or two. So what's going on here?

Update: Ok, I just hooked the Pi up to a display, and started copying files via WiFi. After about 15 minutes the Pi just froze. I had a tmux running with output of htop and tail -f /var/log/messages. No visible kernel panic, nor anything in /var/log/messages. The machine is frozen.

13
  • One thing I am wondering about: What good does the wpa_cli do? Can it interfere with the wpa_supplicant?
    – Arne
    Commented Mar 10, 2013 at 11:24
  • I changed my /etc/network/interfaces similar to the one listed here: elinux.org/RPi_edimax_EW-7811Un, and now it seems to work quite well. Has been up for some hours, and still working, without a reconnect.
    – Arne
    Commented Mar 10, 2013 at 14:43
  • And now, ten minutes later, I get two reconnects. So the problem is not gone. As long as it reconnects only every couple of hours, I am happy. Let's see...
    – Arne
    Commented Mar 10, 2013 at 15:00
  • Are you still having the problem?
    – Jivings
    Commented Mar 24, 2013 at 9:54
  • 1
    Hopefully this bounty will get you slightly more attention.
    – Jivings
    Commented Mar 26, 2013 at 8:28

5 Answers 5

7

I figure that I can safely say now that the problems are due to the device and/or the rt2x00 driver. I have been using Ethernet only the last 48 hours, copied many many Gigabytes of data, and haven't got a single problem. Hence, currently I would discourage the usage of rt2800 based devices, and I will try to find another dongle, maybe one with the Realtek chip, since that seems to be the most widely used.

EDIT: I bought a TPL-WN725N with a RTL8188CUS chip. It works out of the box, currently with 0.5 GB of traffic, and still running. It also seems somewhat faster than the Ralink based dongle. I get 1.9MByte/sec, whereas before I had 1.3MByte/sec. Let's see if it will let the Pi run longer and not freeze up.

EDIT: >5 GB and still going strong. Looks very promising. Will keep it running to see if it fails.

7
  • So who do you want me to award this bounty to? :)
    – Jivings
    Commented Apr 1, 2013 at 23:48
  • Well, not me. That would be unfair, I think. I leave it up to you.
    – Arne
    Commented Apr 2, 2013 at 8:08
  • I'm not sure if the realtek are the best drivers/chips. I have one (RTL8188CUS), it's ok, but it is not that great, with quite frequent disconnections/reconnections. The driver seems stable, tho, even upon unloading/reloading. On the other side, i read around of good experiences with other ralink based dongles on the pi. I ordered a 5€ dongle supposed to have ralink chip in it myself, of which i read good, and planning to test it out soon. There's also a wikipage for verified peripherals (of which you might be already aware): elinux.org/RPi_VerifiedPeripherals
    – Pa_
    Commented Apr 2, 2013 at 12:55
  • I found this here: raspberrypi.org/phpBB3/viewtopic.php?f=24&t=5830 -- My Raspberry Pi is from last year, maybe I have the version with the polyfuses limiting the WiFi adapter? I had been using the Edimax dongle on the Raspberry Pi (w/ 1.2A power supply).
    – Arne
    Commented Apr 2, 2013 at 13:47
  • However, since my Pi reboots when I (hot-)plug in the Edimax, I guess my Pi already comes with disabled Polyfuses.
    – Arne
    Commented Apr 2, 2013 at 13:55
2

There is a special version of hostapd (deals with wireless authentication) you should use with this adapter. The Realtek Chipset doesn't work particularly well if at all with the 'out of the box' Raspbian distro version.

I posted a guide to installing this Wifi adapter for use as an AP on my blog.

If you don't want to check out my blog, here is the link for the guide I used.

2
  • I am not sure your answer applied here. I understand that hostapd is for Pis running as an acces point..? Mine is running as a client.
    – Arne
    Commented Mar 26, 2013 at 22:35
  • Sorry, got the wrong end of the stick there :)
    – BigCowPi
    Commented Mar 27, 2013 at 19:08
2
+200

i have no idea, to be honest, but there are two things you could try:

first one is playing around with the power saving options documented in the realtek driver package. right now i use maximum power saving, by:

insmod /lib/modules/3.6.11+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko  rtw_power_mgnt=2 rtw_ips_mode=1 rtw_hwpwrp_detect=1 rtw_enusbss=1

but you might try different combinations of the options above.

second thing you could try is to have a cronojob every n minutes that checks whether the wlan is working (for example using fping or whatsoever), and if not it brings it down and up again (by using network manager command line client), possibly also removing and reinserting the module

9
  • I have such a script already running (every 5m it syslogs whether wifi is up or down, and restarts wifi), but it does not help. Right now I guess the whole system halts, because at some point logging to /var/log/messages stops altogether. Trying to debug with attached display now.
    – Arne
    Commented Mar 31, 2013 at 10:59
  • As I wrote above: the Pi just froze. Keyboard dead, display output frozen, no further messages.
    – Arne
    Commented Mar 31, 2013 at 11:11
  • 1
    Furthermore: It seems my Edimax uses the rt2800 driver, not the rtl8192.
    – Arne
    Commented Mar 31, 2013 at 11:13
  • You need to rule out the possibility that the wifi driver problem and the freezing problem are unrelated by removing the dongle and doing the same test via ethernet.
    – goldilocks
    Commented Mar 31, 2013 at 11:16
  • Doing that right now. So far, 1.7GB copied without a problem. Still going.
    – Arne
    Commented Mar 31, 2013 at 12:21
2

I have exactly this problem with several different Wifi dongles. Two things.

1.) add this to your /etc/network/interfaces

wireless-power off

2.) wlan0: deauthenticating from xxx by local choice (reason=3) repeatedly can be from a dauthentication attack on your wifi

2

Found this explanation which states power management from the driver might be at fault. It also suggests using these changes for the driver:

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

and paste the following in:

# Disable power saving
options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.