OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Network issue › Re: Re: Network issue
February 18, 2014 at 7:27 am
#25999
alanwbaker
Participant
There’s a bug in the networking that affect Pi’s that have both ethernet and wi-fi… My board will run EITHER the eth0 interface OR the wlan0 interface reliably but not both. So I set up wlan0 in etc/network/interfaces as follows:
# Loopback
auto lo
iface lo inet loopback
# Ethernet must be commented out for wlan0 to work (!)
#allow-hotplug eth0
#iface eth0 inet static
# address 192.168.0.7
# netmask 255.255.255.0
# network 192.168.0.0
# broadcast 192.168.0.255
# gateway 192.168.0.4
# Wi-fi
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.8
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.4
wpa-ssid "myssid"
wpa-psk "xxxxxxxxxxxxxxxxx"
# wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# iface wlan0 inet manual
#Default
iface default inet dhcp
Note the commented-out lines. This is set up as a static IP–simpler and more reliable than reserved DHCP. Hope this helps.