5

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?

  • "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 Jul 18 '15 at 14:00
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!

protected by Ghanima Feb 9 '16 at 6:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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