WiFi AP mode Enable/Disable


With the standard ioT image supplied with the BeagleBone Enhanced the WiFi adapter is in tether mode at startup, so to connect to a WiFi network you need to first disable tethering:

root@beaglebone:~# connmanctl
connmanctl> tether wifi disable
Disabled tethering for wifi
connmanctl> enable wifi
Error wifi: Already enabled
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
*AO Wired                ethernet_b0d5ccf1bf9a_cable
*A  SANCLOUD             wifi_54e4bd94f001_4d4152434d_managed_psk
    TEST_NET             wifi_54e4bd94f001_544553545f4e4554_managed_none
connmanctl> agent on
Agent registered
connmanctl> connect wifi_54e4bd94f001_4d4152434d_managed_psk
Connected wifi_54e4bd94f001_4d4152434d_managed_psk
connmanctl> quit

Check the IP address that has been given to you by the AP:

root@beaglebone:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 54:e4:bd:94:f0:01
          inet addr:10.0.0.68  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::56e4:bdff:fe94:f001/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1
          RX packets:69 errors:0 dropped:38 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10538 (10.2 KiB)  TX bytes:10615 (10.3 KiB)

root@beaglebone:~#

 

You may be asked for the passphrase, this is then cached in connman, so when you reboot it will connect automatically.

You can of course put it back to tether AP mode by:

root@beaglebone:~# connmanctl
connmanctl> agent off
Agent not registered
connmanctl> tether wifi enable
Enabled tethering for wifi
connmanctl> quit

Then the AP will be back.