Re: Wireless Network on Live Medium with connman
Reply #2 –
Hello again, and I apologize for the late response.
I read the wiki and was able to get wpa_supplicant working easily as follows:
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.config
wpa_cli
> scan
> scan_results
> add_network
> set_network 0 ssid "SSID"
> set_network 0 psk "PSK"
> enable_network 0
> save_config
> quit
dhcpcd
It behaved exactly as expected and fixes my problems connecting to the Internet.
With connmanctl, however, I am still having trouble. It would seem like I could just type the following to get a working connection:
connmanctl
> enable wifi
> scan wifi
> services
> agent on
> connect wifi_...
But I'm given an error at "scan wifi" saying "Error /net/connman/technology/wifi : No carrier."
I'll leave what I've found so far here in case anyone else is having a similar problem even though connecting with wpa_supplicant works for me.
It's hard to give you an exact reproducible behavior for connman because every time I reboot it acts slightly differently, but it never connects the first time and I always have to enable and disable wifi with connmanctl at least once before it will decide to go through with scanning wifi. Sometimes starting dhcpcd externally causes it to connect (which shouldn't be necessary since connmanctl has an internal dhcp implementation) or toggling the wifi button on the keyboard a few times seems will sometimes get it to connect. I'm guessing that might have something to do with this.
It seems like this might be a hardware quirk, but there is also a bug from 2016 that describes my problem referenced here and here, but I don't have permission to access the actual bug report.
Surely there isn't some background process that needs to complete before connman can connect to wifi? Waiting a few minutes doesn't seem to make any difference, but also it seems like when I do the same thing over and over again it works, which would be a symptom of a prerequisite background process needing to finish something.
dmesg doesn't give me anything really helpful. Is there anywhere else I could look? rfkill shows wireless networks as being blocked on boot, but I think that's normal and connman unblocks them when it enables wifi.
I guess my problem is solved since wpa_supplicant works easily, but it would be nice to know why connman is acting so odd.
Thanks for the help.