BBB File /etc/network/interfaces.client
When the WiFi is operating in client mode, we need a different '/etc/network/interfaces' file than when in AP mode. As a client, we want our address to be assigned by the AP we're connecting to. See /etc/network/interfaces.client for the AP file.
The /usr/local/sbin/wifiModeClient script copies this file over the '/etc/network/interfaces' file before bringing the wlan0 interface back up.
Note that we're using 'wpa-roam' and not 'wpa-conf' to specify the supplicant file. If you use 'wpa-conf', you can only connect to a single network, not find an available one and connect.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # Example to keep MAC address between reboots #hwaddress ether DE:AD:BE:EF:CA:FE # WiFi Example #auto wlan0 #iface wlan0 inet dhcp # wpa-ssid "essid" # wpa-psk "password" # Ethernet/RNDIS gadget (g_ether) # ... or on host side, usbnet and random hwaddr # Note on some boards, usb0 is automaticly setup with an init script # in that case, to completely disable remove file [run_boot-scripts] from the boot partition #iface usb0 inet static # address 192.168.7.2 # netmask 255.255.255.0 # network 192.168.7.0 # gateway 192.168.7.1 auto wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp