Connman

From Void Linux Wiki
Jump to: navigation, search

Installation

# xbps-install -S connman

Wireless

Disable the dhcpcd and wpa_supplicant services:

# rm -rf /var/service/dhcpcd
# rm -rf /var/service/wpa_supplicant

Add D-Bus configuration to allow connman to get commands via D-Bus:

# /etc/dbus-1/system.d/connmand.conf
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy context="default">
   <allow own="net.connman"/>
   <allow send_destination="net.connman"/>
   <allow send_interface="net.connman"/>
  </policy>
</busconfig>



Enable and start the connmand service:

# ln -s /etc/sv/connmand /var/service

Using the interactive CLI connmanctl, connect to a wireless access point, replacing "wifi_<uniqueid>" with whichever corresponds to the access point you wish to connect to. Tab can be used to autocomplete:

# connmanctl
> enable wifi
> agent on
> scan wifi
> services
> connect wifi_<uniqueid>
> exit

Preventing DNS overrides by Connman

Make a copy of /etc/sv/connmand:

# cp -avr /etc/sv/connmand /etc/sv/connmand-nodnsproxy

Edit /etc/sv/connmand-nodnsproxy:

#!/bin/sh
exec connmand -n -r

Replace connmand with the edited variant:

# rm -rf /var/service/connmand
# ln -s /etc/sv/connmand-nodnsproxy /var/service

Troubleshooting

Error getting services/Error getting peers/Error getting technologies

Use a priveleged user to run connmanctl, eg., using sudo:

$ sudo connmanctl

Connected to an access point but no internet

Try changing your DNS nameservers, maybe use those listed in https://wiki.opennic.org/doku.php:

# connmanctl
> config wifi_<uniqueid> --nameserver 185.121.177.177 169.239.202.202
> exit

Then restart connmand:

# sv restart connmand