5

I observed, that after a while (some hours) my Pi isn't reachable over the wlan any more. If I do some excessive ping-ing (i.e. for 70-100 times) the Pi starts at some point to respond and I can successfully establish an ssh-connection.

Q1. Can somebody explain why the above approach works?

Q2. What can I do to keep the Pi connected?

EDIT 1

  • distribution: Raspbian GNU/Linux 7 (wheezy), Linux version 3.12.28+
  • wifi-dongle: Edimax Technology Co., Ltd EW-7811Un
  • /etc/interfaces:

    allow-hotplug wlan0
    auto wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp
    
  • the Pi has a static IP

EDIT 2

Today, I received a wifi-dongle from the The Pi Hut which does not suffer from the aforementioned problem up to now. ping and ssh work immediately.

related posts 1st, 2nd

participant
  • 981
  • 2
  • 8
  • 20

3 Answers3

5

These problems often seem to be related to wireless power management.

As a first attempt try

iwconfig wlan0 power off
joan
  • 71,852
  • 5
  • 76
  • 108
2

A crude way of keeping the connection alive: on the Raspberry Pi, create a crontab entry (crontab -e) to ping a host once an hour:-

# m h  dom mon dow   command
  3 *  *   *   *     ping -c 1 somedomain.com > /dev/null
scruss
  • 9,117
  • 1
  • 25
  • 36
2

Using the advice from here I did

$ iw wlan0 get power_save
Power save: on

It was ON, and I set it to OFF with

iw wlan0 set power_save off

Hint To make this setting permanent I did this.

participant
  • 981
  • 2
  • 8
  • 20