Page 1 of 1

Loosing WiFi connection

Posted: Sun Jul 19, 2015 11:35 am
by Heimchen
Hi,

I'm using the Raspi with raspian and configured a network bridge. So it is connecting a little web server (LAN) with my router (WLAN). After reboot everything works fine but after a few minutes the Raspi is not longer reachable from network, even not the webserver. Here is my /ect/network/interfaces:

Code: Select all

# Localhost auto lo
auto lo
iface lo inet loopback

# Ethernet
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

# WLAN
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

# Bridge
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
bridge_fd 5
bridge_stp off
iwconfig says that Power Management is off for wlan0. What could be the problem?

Regards,
Heimchen

Re: Loosing WiFi connection

Posted: Sun Jul 19, 2015 12:20 pm
by drgeoff
What WiFi dongle?

Is Dougie's post relevant?
viewtopic.php?p=790919#p790919

Re: Loosing WiFi connection

Posted: Sun Jul 19, 2015 4:56 pm
by okurth
Did you check if the interfaces are up when it's not working? Check the log files. Maybe ifplugd is bringing one or both interfaces down, in that case you can disable it in /etc/default/ifplugd.

Re: Loosing WiFi connection

Posted: Sun Jul 19, 2015 5:01 pm
by DougieLawson
okurth wrote:Did you check if the interfaces are up when it's not working? Check the log files. Maybe ifplugd is bringing one or both interfaces down, in that case you can disable it in /etc/default/ifplugd.
The easier way to disable the useless program is sudo apt-get purge ifplugd. It does nothing useful for the advanced users.

Re: Loosing WiFi connection

Posted: Sun Jul 19, 2015 5:57 pm
by JimmyN
Heimchen wrote: iwconfig says that Power Management is off for wlan0. What could be the problem?

Regards,
Heimchen
From what I've seen iwconfig always says power management is off, whether it is or not. Not all adapters support power management, but it may be due to the driver available rather than the actual hardware. I have several Edimax EW-7811Un adapters that go to sleep after a few minutes and drop the wireless connection. An "iwconfig" will show power management is off, but that's obviously not true.

Every time I set up a fresh install on an SD card I am soon reminded that the Edimax adapter is going to sleep when I lose the wireless after a few minutes of inactivity, and can't access the Pi. So I create a 8192cu.conf file in /etc/modprobe.d/ (actually I copy the file over from a flashdrive since I do this a lot), and turn power management off for real. The problem goes away with no more lost wireless. iwconfig still reports power management is off, but now it just happens to be correct.

Re: Loosing WiFi connection

Posted: Mon Jul 20, 2015 6:59 pm
by Heimchen
Hi,
after reboot all interfaces are up. When connection is lost, the bridge interface is down. If I remove the autostart for bridge interface, the connection is not lost.
It's an Edimax dongle. I did not find a solution yet.

Regards, Heimchen

Re: Loosing WiFi connection

Posted: Tue Jul 21, 2015 6:37 pm
by Heimchen
Hi,
I just checked some logs and found some entries in messages and kern.log when connection is lost:

Code: Select all

br0: port 2(wlan0) entered disable state
smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
device eth0 left promiscuous mode
br0: port 1(eth0) entered disabled state
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
device wlan0 left promiscuous mode
br0: port 2(wlan0) entered disabled state
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
But I jus see, that bridge is disabled, but why?

Regards, Heimchen