6

I have my RPi connected to the net via an a wifi usb stick which is on a powered usb hub.

After about 12 hour or so the connection is lost. i.e. I cant reach the Ppi anymore. If I unplug and replug it, the connection is back immediately.

Are there any logs where I can look for the problem?

1
  • "Are there any logs where i can look for the problem?" -> On Raspbian everything that's logged to or by the OS should end up in /var/log/syslog.
    – goldilocks
    Commented Jul 18, 2015 at 14:00

3 Answers 3

6

There is a raspberry pi ethernet problem and a wifi drop problem. you may also see that not even your wi fi adapter but also any other port (usb) not working.

there are couple of fixes -

https://github.com/dirttech/SmartMeter/blob/master/wifi_drop.sh (put in rc.local)

for wifi drop

and ----- blob/master/piFix.sh ( put 3-5 min cron job)

for port freeze problem.

here is full solution http://raspberrypispot.wordpress.com/2013/07/08/wifi-and-ethernet-dropout-problems-in-raspberry-pi/

2

I would suggest backing up your Pi and installing the latest official raspbian image from scratch. Do an upgrade and firmware upgrade. The reason I suggest it because it has wpa-supplicant pre installed and all you need to do is add 3 or 4 lines in to the supplicant file.

This is different because the interfaces file uses wpa-roam. Thanks to that line if you loose connection wpa-supplicant will try to reconnect to the next access point in the file. If there is only one it will try to reconnect to that one only.

I was messing about for weeks with an old image that was upgraded and had lots of rubbish. COnnection was dropping out all the time and it was driving me mad. I put on the latest image and my wifi is stable now. I could not run for an hour or more -with the new install it is going for over 24hours now. I am not sure how many times it reconnects but I know it is connected the whole time now.

Interfaces file

#/etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

The supplicant file

#/etc/wpa_supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="ssid_leave_the_quotes"
  proto=WPA RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP
  psk="password_leave_the_quotes"
}

Proto: WPA is WPA1. RSN is WPA2. If you leave both supplicant will figure out which one but if you dont specify one in there it wont automatically detect and use it.

pairwise: CCMP is AES counted. TKIP is WPA2 key manager. Again if you leave both supplicant will choose the correct one.

key_mgmt: will always be WPA-PSK for home routers. If you have a private key router this will be different and you will know what to put there.

1

after many years i found out that the problem was the usb hub. once i connected the wifi dongle to the raspberry pi itself, the connection was stable!

Not the answer you're looking for? Browse other questions tagged or ask your own question.