0

The built-in WiFi adapter on my old MacMini does not handle weak signals very well resulting in a slow connection. Therefor I'm using a USB adapter instead. After restarting the computer the output from ip address looks like this:

...
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 90:84:0d:f3:85:7e brd ff:ff:ff:ff:ff:ff
    altname wlx90840df3857e
4: wlx98ba5fa6d7f8: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 98:ba:5f:a6:d7:f8 brd ff:ff:ff:ff:ff:ff

As we can see there is no connection for either of the WiFi interfaces despite the latter interface having been connected before the computer was restarted. My guess is that this is due to the operating system not knowing which interface to choose. What is the recommended way to permanently disable wlan0? I run Debian 13 and use connman-gtk to connect to WiFi (no NetworkManager installed).

Edit

The Connman settings shows that the USB WiFi interface should be automatically connected. However, after restarting the computer that doesn't happen.

$ ls /var/lib/connman/
ethernet_d49a20f8dca8_cable
settings
wifi_98ba5fa6d7f8_4f574e49545f3547487a5f443343314137_managed_psk
$ sudo grep AutoConnect /var/lib/connman/wifi_98ba5fa6d7f8_4f574e49545f3547487a5f443343314137_managed_psk/settings
AutoConnect=true

For some reason, when WiFi is re-enabled it connects to the default access point:

$ connmanctl state
  State = idle
  OfflineMode = False
  SessionMode = False
$ connmanctl disable wifi
Disable wifi
$ connmanctl enable wifi
Enabled wifi
$ connmanctl state
  State = ready
  OfflineMode = False
  SessionMode = False

1 Answer 1

1

You can prevent connman from configuring a network interface at all, by adding it to the comma-separated NetworkInterfaceBlacklist= list in the [General] section of /etc/connman/main.conf.

However, it would seem strange to me to do that – instead, I'd simply configure my connections to only use the wifi device of choice, not the one you don't want. You'd do that by (either using a connman configuration frontend, or) editing /var/lib/connman/wifi_{network id}/settings and setting the DeviceName= accordingly.

Note that ConnMan understands itself, to quote

ConnMan is a daemon for managing Internet connections within embedded device

I.e., for devices that aren't used as "computers", but as some other device class that integrates a Linux computer under the hood; quite for the opposite of what a macbook is! It certainly works for that, and the remaining ConnMan developers¹, but you're really doing a bit of a niche choice in infrastructure there – not a criticism, just so that you're aware that if things feel "hard to use", then that's because you picked the hard route.


¹ intel wrote ConnMan (so much for "anti-big compute" conspiracy theories that are usually used to discredit NetworkManager…), but drastically reduced involvement in the project around 2012; one could argue that they lost interest. These days, the project is still active, and the Jolla project (embedded connection manager for a tablet/phone operating system competing with Android) as well as a lot of deeply embedded companies (windriver, LG's home appliances, room lighting companies, …) contribute heavily; the same people working on embedded bluetooth appliances in the linux kernel are also regular contributors. So, it's really an active Linux project, but I'd say that the people driving it have a different set of goals than the people driving end-user Linux distros, for actual humans sitting in front of a Linux laptop.

9
  • Connman is the default connection manager for some lightweight desktop environments like LXQt so it's not only for embedded devices. Commented Aug 17 at 17:25
  • @AugustKarlstrom as said, yes, it was definitely written for that, and the people maintaining it are from the embedded world. It doesn't preclude usage on a desktop distro, at all, but it's missing a lot of the dynamic reconfiguration and user interaction focus that the mainstream has, so yes, it's harder to configure for most mainstream use cases – as you are noticing yourself. This would have been two clicks (or a single nmcli invocation) on a NetworkManager system! Again, not criticising, just pointing out that you're using something not as easily convinced to work for your use case. Commented Aug 17 at 17:35
  • When the WiFi is re-enabled with Connman it connects to the default access point (see updated question). I have no idea why it cannot connect automatically on boot. Commented Aug 17 at 19:12
  • how precisely are you making sure it uses the right device? and what has device selection to do with the AP? Very confused here. Commented Aug 17 at 19:40
  • I have tried blacklisting the built-in interface wlan0 so that it doesn't show up in the list of available interfaces. The USB interface starts working after re-enabling it. Since wlan0 is now blacklisted I know that the USB interface is in use. The question is why I need to re-enable it. By the way, is there a command to just switch it from idle to accepting traffic. In idle state I see no list of access points. Commented Aug 17 at 20:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.