This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
ConnMan¶
ConnMan is a CLI network manager designed for use with embedded devices and fast resolve times. It is modular through a plugin architecture, but has native DHCP and NTP support.
Reference(s)
Table of contents¶
TODO¶
-
pure CLI interfaces definition (e.g.
eduroam
: https://wiki.archlinux.org/index.php/ConnMan#Connecting_to_eduroam_(802.1X)) -
ncurses
client: https://github.com/eurogiciel-oss/connman-json-client -
GUI client:
connman-gtk
Install¶
Very useful optional dependencies to install:
Then, install connman
:
The previous installation step allow to control connman
with connmanctl
, but you might want a
user interface and not just a cli
tool:
connman-gtk
(GTK client forconnman
)cmst
(Qt GUI forconnman
)connman-ncurses
(Simplencurses
UI forconnman
)ConnMan-UI
(GTK 3 client applet forconnman
)connman_dmenu
(Client/front-end fordmenu
)LXQt-Connman-Applet
(LXQt desktop panel applet forconnman
)gnome-extension-connman
(Gnome 3 extension forconnman
)
Now, add connman
to your init manager:
Depending on your runit
implementation, either run:
Config¶
-
If you want to prefer Ethernet over wireless:
-
If you don't want to allow to be connected to both Ethernet and wireless at the same time (in order to have only a single unambiguous connection active at a time):
-
If you don't want to let
connman
change the transient host name on a per network basis (which can cause problems with X authority): -
If something like Docker is creating virtual interfaces,
connman
may attempt to connect to one of these instead of your physical adapter if the connection drops. A simple way of avoiding this is to blacklist the interfaces you do not want to use.connman
will by default blacklist interfaces starting withvmnet
,vboxnet
,virbr
andifb
, so those need to be included in the new blacklist as well. Blacklisting interface names is also useful to avoid a race condition whereconnman
may accesseth#
orwlan#
beforesystemd
/udev
can change it to use a Predictable Network Interface Names likeenp4s0
. Blacklisting the conventional (and unpredictable) interface prefixes makesconnman
wait until they are renamed.
Use¶
- Shows a list of all technology types existing on the system (e.g.
ethernet
,wifi
,bluetooth
...) , their properties and their status:
WiFi¶
-
Enable
wifi
, note that it powers on to the WiFi, but doesn't connect unless there is a service with auto connect set to True: -
Connect to a non password protected WiFi access point:
-
Connect to a password protected WiFi access point:
-
After the first connection, a
wifi
service is saved in/var/lib/connamn/wifi_*
. It's settings can be modified, e.g. the auto connection setting: -
Disconnect:
-
Note that some WiFi connection points may need additional steps, like for
eduroam
.
Ethernet¶
-
Ethernet connections are setup automatically. After the first connection, an
ethernet
service is saved in/var/lib/connamn/ethernet_*
. It's settings can be modified, e.g. the auto connection setting: -
Sometimes, multiple
Create two network interfaces:ethernet
interfaces are needed with a singleethernet
mac address (typically depending on the network you want to connect to). This can be achieved like so:Change the settings of those network interfaces the way you want: Select one of those interfaces with a symbolic link:$ sudo cp ethernet_00249b2c785a_cable ethernet_00249b2c785a_cable_network_name_1 $ sudo mv ethernet_00249b2c785a_cable ethernet_00249b2c785a_cable_network_name_2
Troubleshooting¶
ConnMan dmenu
¶
- TODO:
connman
dmenu
for Ethernet interfaces - TODO:
connman
dmenu
for WiFi selection - see https://github.com/march-linux/connman_dmenu
If this cheat sheet has been useful to you, then please consider leaving a star here.