Embedded Linux Using ConnMan ( Connection Manager )

Embedded Linux Using ConnMan ( Connection Manager )


Booting an embedded Linux device with a root file system over NFS is a common method of development. However, if trying to integrate ConnMan into the system under developement, there can be a problem with enabling the ConnMan daemon where when started, it grabs the ethernet adapter and mis-configures it so that the NFS connection is lost. In this case, the developer will see messages like: "nfs: server xxx.xxx.x.x not responding, still trying".

To work around this add -I to the arguments of the connman daemon. The daemon ( connmand ) will then ignore the eth interface specified and will not disconnect the NFS. Note that this might not work if using more than one eth interface.

Start ConnMan like this:

>> connmand -I eth0

Where eth0 is your dev board's ethernet interface which it is using to boot over NFS.

Here's an example script on how to control ConnMan with connmanctl.

#! /bin/sh

## Kill ConnMan daemon

systemctl stop connman

killall connmand

## Load wireless drivers

/sbin/rmmod <wireless_driver>

/sbin/modprobe <wireless_driver>

## Create a wpa_supplicant configuration file

cat<<-___EOF___ > /tmp/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

___EOF___

## Start wpa_supplicant

wpa_supplicant -c/tmp/wpa_supplicant.conf -iwlan0 -Dnl80211 -B -u

## Start ConnMan and ignore the NFS ethernet interface

connmand -I eth0

systemctl enable connman

## Print the ConnMan version

connmand --version

## Enable wifi

connmanctl enable wifi

## List technologies

connmanctl technologies

## Scan for wifi

connmanctl scan wifi

## List all services

connmanctl services




ClassyBits 2016