WiFi client

There is a possibility to connect the Erle-Brain 2 to a WiFi network. The brain will be one client more of your local network, can be useful for connect multiple brains to the same network.

Save in a file the wpa network name and password. Adapt it, to your network configuration.

erle@erle-brain-2 ~ $ wpa_passphrase Erle-Robotics 12345 > erle.conf

Move the configuration to /etc/wpa_supplicant/

erle@erle-brain-2 ~ $ sudo mv erle.conf /etc/wpa_supplicant/

Edit /etc/network/interfaces

# Please note that this file is written to be used with dhcpcd.
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'.

auto lo
iface lo inet loopback

#auto eth0
#allow-hotplug eth0
#iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/erle.conf

#auto wlan1
#allow-hotplug wlan1
#iface wlan1 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#auto wlan0
#iface wlan0 inet static

Then reboot your system.

Be careful, it is possible your router assign different IP address. You can associate IP/MAC to solve this.

To connect your Erle-Brain 2, change the IP of the ~/apm.shscript, for example:

$APM_BIN_DIR/APMrover2.elf -A udp:$wifi -B /dev/ttyAMA0 $FLAGS

For this:

$APM_BIN_DIR/APMrover2.elf -A udp: -B /dev/ttyAMA0 $FLAGS

Change the, for the IP of your computer.