Monday, November 30, 2015

Pi SSH Disconnects and Power Management

Solved an ongoing issue with the Pi, and that is I often come back to my computer with all of my SSH terminals disconnected.

I would log back in again, and check that the uptime was still days whereas I had been away for much less than that.  So I concluded the Pi hadn't rebooted, thereby disconnecting the terminals.

It always seemed to be after a somewhat lengthy time away, but sometimes not all that long (like a few hours).

I thought first it was possibly idle connections being cut.  I played around with some settings but it didn't really do much.



After some reading online, I decided to try looking into power management on the WiFi adapter.  This was the solution.  The stackexchange discussion which led me to the solution is here (link).

The adapter I use is the recommended adapter noted in a prior post (link).

The commands required are seen below.

$ iwconfig
wlan0     IEEE 802.11bgn  ESSID:"DV_2.4Ghz"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:81:D8:D5:46:3C
          Bit Rate=5.5 Mb/s   Tx-Power=1496 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-34 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

$ sudo iwconfig wlan0 power off

$ iwconfig
wlan0     IEEE 802.11bgn  ESSID:"DV_2.4Ghz"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:81:D8:D5:46:3C
          Bit Rate=5.5 Mb/s   Tx-Power=1496 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-33 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0



After having run this command, the issue has not come up again.

A persistent on-boot configuration will likely be required.  I doubt this command stays in effect across reboots.


3 comments:

  1. gioco digitale | stillcasino
    gioco digitale. The latest online casino product and exclusive offer, free spins 12bet & no 카지노사이트 deposit welcome bonus, sign up gioco digitale bonus, slots, video poker machines

    ReplyDelete
  2. Being within the trade for years, Yukon Gold has proven its credibility and even has ensures from Ecograph. More important is the casino’s collaboration with reliable software program builders. The presence of titles from well-known builders is a sign of a severe club. These embody NetEnt, Yggdrasil, Microgaming, Playtech, and others. Some casinos introduced certificates of software program verification by independent auditors, which proves their authenticity. An trustworthy casino online doesn’t even work with you 온라인카지노 directly in the course of the sport, however directs you to an independent sport software program server.

    ReplyDelete