Thursday 6 February 2014

Raspberry Pi Wifi Disconnects after an arbitrary amount of time

Raspberry Pi Wifi Disconnects after an arbitrary amount of time

I was working with my Raspberry Pi and I often noticed that it would disconnect from the network after an arbitrary amount of time. I had to either reboot or manually restart networking to get it going again. It turns out that the power management is switched on.
You can see if power management is on or off by using the following command. The iwconfig command configures a wireless network interface.
iwconfig
wlan0     IEEE 802.11bgn  ESSID:"ssid"
          Mode:Managed  Frequency:2.437 GHz  Access Point: FF:FF:FF:FF:FF:FF
          Bit Rate=52 Mb/s   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on          Link Quality=41/70  Signal level=-69 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:50  Invalid misc:26   Missed beacon:0


I then disabled power management for the by editing the wireless interface section in /etc/network/interfaces file. I did this by adding "wireless-power off"
iface wlan0 inet dhcp
    wpa-ssid "ssid"
    wpa-psk "password"
    wireless-power off

Once this is done, I restarted networking to pick up the power management changes.
sudo /etc/init.d/networking restart
If you run iwconfig again, you should see "Power Management: off"

No comments:

Post a Comment