uname -a Linux CamPan 4.4.50+ #970 Mon Feb 20 19:12:50 GMT 2017 armv6l GNU/Linux
I have, after some struggles, managed to get BOTH wired (eth0) & wireless (wlan0) working on my Pi.
As per instructions here:
https://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip-address
I made one minor addition to /etc/network/interfaces
, adding auto wlan0
above
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Supplicant.conf
looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="XYZ"
key_mgmt=NONE
}
network={
ssid="ABC"
psk="*****"
key_mgmt=WPA-PSK
}
network={
ssid="DEF"
psk="*****"
key_mgmt=WPA-PSK
}
network={
ssid="GHI"
psk="*****"
key_mgmt=WPA-PSK
}
The last lines of /etc/dhcpcd.conf
:
interface eth0
static ip_address=192.168.7.220/24
static routers=192.168.7.1
static domain_name_servers=192.168.7.1
interface wlan0
static ip_address=192.168.7.221/24
static routers=192.168.7.1
static domain_name_servers=192.168.7.1
Wireless connectivity works, providing eth0 is connected but if I reboot without a wired connection, the wireless isn't available.
The application is a Pi with an Adafruit stepper shield. It's running two stepper motors to control a stop-frame animation panning rig. I'm also learning how to create Python Restful APIs to control it, so I can control it via a web app (probably from my phone).
I need wireless for control and I need wired or wireless for setup, dev & test but it's a pain to have to connect wired for wireless. I could exclude the eth0 config and I presume that might work but it seems like an unnecessary hack. How can I have both eth0
AND wlan0
, independently