wpa-supplicant terminates on connection loss
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hello everybody,
my raspberry pi is not capable of keeping up a wifi connection. If it loses the connections once, wpa-supplicant terminates, no further connection attemps, pi will be offline.
Probably relevant parts of the syslog:
Apr 9 16:13:01 raspberrypi kernel: [164879.884780] wlan0: deauthenticated from 34:31:c4:15:4b:b8 (Reason: 6=CLASS2_
Apr 9 16:13:01 raspberrypi ifplugd(
Apr 9 16:13:01 raspberrypi wpa_supplicant[
Apr 9 16:13:08 raspberrypi wpa_supplicant[
Apr 9 16:13:08 raspberrypi kernel: [164886.181976] wlan0: authenticate with 34:31:c4:15:4b:b8
Apr 9 16:13:08 raspberrypi kernel: [164886.314090] wlan0: send auth to 34:31:c4:15:4b:b8 (try 1/3)
Apr 9 16:13:08 raspberrypi wpa_supplicant[
Apr 9 16:13:08 raspberrypi kernel: [164886.329531] wlan0: authenticated
Apr 9 16:13:08 raspberrypi kernel: [164886.333914] wlan0: associate with 34:31:c4:15:4b:b8 (try 1/3)
Apr 9 16:13:08 raspberrypi kernel: [164886.348426] wlan0: RX AssocResp from 34:31:c4:15:4b:b8 (capab=0x31 status=0 aid=1)
Apr 9 16:13:08 raspberrypi wpa_supplicant[
Apr 9 16:13:08 raspberrypi kernel: [164886.357101] wlan0: associated
Apr 9 16:13:08 raspberrypi wpa_supplicant[
Apr 9 16:13:08 raspberrypi wpa_supplicant[
Apr 9 16:13:09 raspberrypi ifplugd(
Apr 9 16:13:12 raspberrypi WLAN: Keine Verbindung zu 192.168.178.1, WLAN wird neu gestartet
Apr 9 16:13:13 raspberrypi dhclient: Listening on LPF/wlan0/
Apr 9 16:13:13 raspberrypi dhclient: Sending on LPF/wlan0/
Apr 9 16:13:13 raspberrypi dhclient: DHCPRELEASE on wlan0 to 192.168.178.1 port 67
Apr 9 16:13:17 raspberrypi kernel: [164895.306364] wlan0: deauthenticating from 34:31:c4:15:4b:b8 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr 9 16:13:17 raspberrypi wpa_supplicant[
If this happens, there is referring to pgrep no wpa-supplicant running, and so the pi does not try to reconnect.
Workaround:
Create a skript, and run it as root cronjob every minute:
#!/bin/bash
TESTIP=
ping -I wlan0 -c2 ${TESTIP} > /dev/null
if [ $? != 0 ]
then
logger -t WLAN "No connection to ${TESTIP}, restart wifi"
ifdown --force wlan0
ifup wlan0
fi
I don't really get, why the pi acts so differently here compared to a x86 pc, where wpa-supplicant is completly capable of reestablishing the connection after a loss.
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_
(wpa-roam doesn't work eitehr)
Thanks for reading!
Greetings
MPW
Do you get a kernel crash like in the other bug report?
It mostly looks like a power saving issue to me and your cronjob would prevent your device from going into sleep mode.
What is your wireless device? Post the USB ID which you can get through `lsusb`.
Do you load the needed kernel module with parameters (in /etc/modprobe for example). If so, which?
What is your kernel version (`uname -a`) and does the issue still occur?