ConnMan (short for Connection Manager) is a network management service created by Intel, built with embedded use cases in mind. It is shipped by default on some desktop and mobile distributions however, such as Sailfish OS.
USE flags for net-misc/connman Provides a daemon for managing internet connections
||Enable Bluetooth Support|
||Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces|
||Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally|
||Enable ethernet support.|
||Install examples, usually source code|
||Use net-firewall/iptables as firewall.|
||Enable wifi support via net-wireless/iwd|
||Use net-dialup/xl2tpd for L2TP VPN support.|
||Enable net-misc/networkmanager support|
||Use net-firewall/nftables as firewall.|
||Use net-misc/ofono for telephony support.|
||Use net-vpn/openconnect for VPN support.|
||Use net-vpn/openvpn for openvpn support.|
||Enable PolicyKit (polkit) authentication support|
||Use net-dialup/pptpclient for PPTP VPN support.|
||Enable testing tools.|
||Use net-vpn/vpnc for cisco VPN support.|
||Enable wireless network functions|
||Enable WireGuard VPN support.|
||Enable support for WISPr hotspot logins.|
Make sure to enable the proper USE flags for what you plan to use ConnMan for. If this is a mobile device and you want mobile data support, make sure to enable the
ofono USE flag.
emerge --ask net-misc/connman
Having multiple network management utilities running at the same time (NetworkManager, dhcpcd, etc) is not a good idea. However, ConnMan can be configured to not touch WiFi/Ethernet so it can play nice with these other programs, see the bottom of this article.
To enable ConnMan at boot:
rc-update add connman default
To start ConnMan now:
rc-service connman start
To enable ConnMan at boot and start it now:
systemctl enable --now connman
connmanctl is an interactive CLI application that comes installed with ConnMan. Make sure
connmand has been started, either manually or through the init system, or ConnMan will be unable to function.
connmanctl can be launched with no arguments to enter interactive mode, or a command can be specified after it (useful for scripting!)
Connecting to a network
Listing available technologies
Should list the available networking technologies for ConnMan, such as
/net/connman/technology/wifi (WiFi support). If you don't see the technology you're looking for, make sure it was set in ConnMan's USE flags, and that support for the network interface is built into the device's kernel.
Powering on the selected technology interface
connmanctl enable wifi
wifi with a network interface technology as desired.
Scanning wireless networks
connmanctl scan wifi
"Scan completed for wifi" should return when scanning is done.
Showing available services
This outputs all available services, no matter if WiFi, Ethernet, or other. If the device is connected to the network,
*AO is in the leftmost column, followed by the SSID in the next, and then followed by a unique identifier. This unique identifier is needed to connect to the network.
Enabling connecting to an encrypted network
connmanctl agent on
Connect to a network
Tab completions are functional in interactive mode!
connmanctl connect your_unique_identifier
Fill in the unique identifier from what is after your network name from
services. If connecting to a wired or unsecured network, no further action is needed. If connecting to a network with a passphrase, enter it when prompted. Note: Double check your password! ConnMan can often be annoying and not re-prompt for incorrect passwords.
Testing a connection
To reveal the connection to the Local Area Network (LAN):
And of course to test connection to the internet:
CMST is a Qt graphical front-end for ConnMan, and comes with a system tray icon. See net-misc/cmst.
EConnMan is the ConnMan UI that's part of the Enlightenment desktop environment. See net-misc/econnman.
ConnMan is throwing some cryptic error I can't find a reference to online!
It's most likely lack of kernel support for the device's WiFi card. Make sure if built as a module it's loaded and that dmesg isn't complaining about a load error.
You can also try using Gentoo's distribution kernel to see if that gets your network card going. If so, run lsmod with and without the distribution kernel and diff the results to view the kernel drivers that were in use with the distribution kernel that weren't with whichever you were running originally.
How to use ConnMan along with NetworkManager/dhcpcd?
NetworkInterfaceBlacklist = usb,wlan
Obviously, change the interface names to those that you wish to blacklist with ConnMan. This allows another service to manage those connections, while utilizing ConnMan for other network interfaces (ie, ofono, bluetooth). If connected via SSH to your device, this should be done first to prevent ConnMan closing the SSH tunnel.
Error: no carrier
In my experience, this means that there isn't proper firmware support for the technology. However, this error can also be caused by improper permissions. Try adding your user to the wheel and network groups, or run connmanctl as root.
- Dhcpcd — a popular DHCP client capable of handling both IPv4 and IPv6 configuration.
- Netifrc — Gentoo's default framework for configuring and managing network interfaces on systems running OpenRC.
- NetworkManager — a network management software for Ethernet, WiFi, DSL, dialup, VPN, WiMAX, and mobile broadband network connections