Beaglebone defaults to WiFi AP mode?

I’ve been struggling to get wifi working on my BBB for the better part of a week now. I sort of succeeded at one point, but I couldn’t tell how I did it. Anyway, long story short, I noticed this morning that when I start a fresh debian image with my Edimax usb wifi plugged in, it defaults to AP mode and is broadcasting a SSID called “Beaglebone-710C”. This makes sense with my problems because I could see the wifi dongle and see it was recognized, but I couldn’t scan or connect. Does anyone know why it would default to AP mode?

by default conman is setting up wlan0 in tether mode, to disable it
and connect to a different AP run:

sudo connmanctl
#connmanctl> tether wifi disable
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit

Regards,

You are the man! Thanks so much, that worked great!

Followups:

  1. How do I get connman to automatically connect? When I reboot, it says it is running and wifi is enabled, but the light the USB dongle doesn’t come on and it doesn’t connect. In order to get it to connect I have to run

ifconfig wlan0 down
ifconfig wlan0 up

Then it lights up and connects in a few seconds. I am not sure if this is a connman problem or something else interfering with it?

  1. Is there a way to stop using connman and just go back to the “interfaces” file and wpa_supplicant? That way just makes more sense to me and seems more straight forward. However, I have tried 2 different “ways” of getting rid of connman and both have issues. I have both “apt-get remove connman”, and also downloaded “rcconf” and disabled connman(read it online), but when I do both, wlan0 disappears and when I do “iwconfig” the interface name shows up as “wlx[my MAC address]”. Is there a way to remove connman peacefully?

  2. Sort of a rant: Why in the hell does connman default to AP mode on a fresh version of debian for BBB?!? It seems ridiculous and a sure way of making newbies(like me) pull their hair out! Where is the documentation that says connman must be used to connect wifi? Why does every online guide(including the official BBB wiki) tell me to do the standard interfaces file and wpa_supplicant, when this doesn’t work out of the box with a new image of debian made specially available for BBB? Just to be clear, I’m not blaming you at all, I am just frustrated that this was sitting under my nose for most a week, even though I spent hours googling and troubleshooting. Maybe I’m just used to Raspberry Pi making it painfully easy for me, but goddamit BBB what a f***ing learning curve. [big exhale]

Thanks again so much for your help.

You are the man! Thanks so much, that worked great!

Followups:

1. How do I get connman to automatically connect? When I reboot, it says it
is running and wifi is enabled, but the light the USB dongle doesn't come on
and it doesn't connect. In order to get it to connect I have to run

ifconfig wlan0 down
ifconfig wlan0 up

Then it lights up and connects in a few seconds. I am not sure if this is a
connman problem or something else interfering with it?

"it should".... wonder if the mac is changing on the interface
between reboots??

2. Is there a way to stop using connman and just go back to the "interfaces"
file and wpa_supplicant? That way just makes more sense to me and seems more
straight forward. However, I have tried 2 different "ways" of getting rid of
connman and both have issues. I have both "apt-get remove connman", and also
downloaded "rcconf" and disabled connman(read it online), but when I do
both, wlan0 disappears and when I do "iwconfig" the interface name shows up
as "wlx[my MAC address]". Is there a way to remove connman peacefully?

Yeah, just define wlan0 in /etc/network/interfaces, then connman will
leave it alone...

3. Sort of a rant: Why in the hell does connman default to AP mode on a
fresh version of debian for BBB?!? It seems ridiculous and a sure way of
making newbies(like me) pull their hair out! Where is the documentation that
says connman must be used to connect wifi? Why does every online
guide(including the official BBB wiki) tell me to do the standard interfaces
file and wpa_supplicant, when this doesn't work out of the box with a new
image of debian made specially available for BBB? Just to be clear, I'm not
blaming you at all, I am just frustrated that this was sitting under my nose
for most a week, even though I spent hours googling and troubleshooting.
Maybe I'm just used to Raspberry Pi making it painfully easy for me, but
goddamit BBB what a f***ing learning curve. [big exhale]

I made this change on Apr 29, 2016.

Regards,