I've been trying to set up two new Pis for about a week now with no success. I have 4 Pis already of the exact same type (RPi 2 Model B). I'm currently trying to get the Realtek 5370 Dongle that comes with the Canakit to work, but I've tried basically every other type of wifi dongle out there too. I've tried different power sources, different outlets, etc and etc. This has all worked perfectly fine on my previous 4 Pis.
The problem is that the 2 new Pis can't maintain a stable connection. They connect to the network just fine, the Pis have an IP. There are even multiple IP addresses in the /etc/resolv.conf file. No errors in dmesg. No errors in /var/log/syslog. However, about every 8 minutes, the Pi cannot resolve any hostnames.
Example workflow: Turn on the Pi. Everything's connected, I can ping 8.8.8.8. If I leave this running, at about ~8 minutes later, I get errors:
From <Pi IP> icmp_seq=1 Destination Host Unreachable
At this point, I can't ping anything. I can't even ping my DNS nameservers -- they give the same error messages. However, I'm still connected to my network, and /etc/resolv.conf still has IPs in it. No matter what I do (ifdown wlan0/ ifup wlan0), I cannot get the name resolving to work during this time period.
About 5 minutes later, I can suddenly ping things again for another 8 minutes. Then the cycle repeats.
What is going on? This is replicated on both of my new Pi's, each of them use the Rasbian Wheezy img, across multiple different power sources, and any wifi dongle (Edimax, Realtek, and so on). Please help, I've been banging my head on the wall for a week on this!
EDIT: /etc/network/interfaces:
auto lo
auto wlan0
auto wlan1
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
allow-hotplug wlan1
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
/etc/wpa_supplicant/wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="***"
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
eap=TTLS
auth_alg=OPEN
ca_cert="/etc/ssl/certs/AddTrust_External_Root.pem"
identity="****"
password="****"
phase2="auth=MSCHAPv2"
}
/etc/network/interfaces
? Anything else you changed. There are maybe a dozen ways to setup WiFi. (Also what version of Rasbpian.) – Milliways Feb 12 '16 at 03:24iface wlan1 inet manual
should refer towlan0
. This should work, although the older configuration did not handle multiple WiFi dongles well. You did not answer which version. Post May 2015 networking setup changed (see http://raspberrypi.stackexchange.com/a/37921/8697). Strictly, if you want to use this you should disabledhcpcd
on the newer releases, but your use ofdhcp
causesdhcpcd
to close. This shoud work, but I would get rid of all mention ofwlan1
. (IMHO the newer setup is better.) – Milliways Feb 12 '16 at 05:17