Hi,
On 08/24/2017 09:06 PM, Sorrillo, Lawrence wrote:
I have been editing files under /var/lib/connman. Per your guidance,
should I add the contents of
The ethernet_505663c9579b_cable/settings file into /etc/connman/main.cf
The /etc/connman/main.conf file allows to set some behavior knobs such
as PreferredTechnologies.
And manage the network that way?
There are two ways how you can configure/provision ConnMan.
1) ConnMan is already running
The configuration is done via D-Bus. There are a bunch of
graphical clients or you can use the command line tool
connmanctl. The Arch community has a pretty neat wiki
page on this [1]
2) ConnMan is not running yet (*)
This is useful if you want to provision something like
an embedded system.
In this case you drop a file under /var/lib/connman with the
file extension ".config". When ConnMan starts(*) it will
read in this configuration file and applies the settings.
The config file format is documented here [2].
(*) ConnMan is monitoring the /var/lib/connman directory
when it is running. That means you can also add a config file
while ConnMan is running. The settings will be applied
immediately.
root@xxx:/etc/ssh# connmanctl services
*AR Wired ethernet_505663c9579b_cable
root@xxx:/etc/ssh#
root@xxx:/etc/ssh#
root@xxx:/etc/ssh# cat
/var/lib/connman/ethernet_505663c9579b_cable/settings
[ethernet_505663c9579b_cable]
Name=Wired
AutoConnect=true
IPv4.method=fixed
IPv4.netmask_prefixlen=25
IPv4.local_address=xxx.xxx.xxx.xxx
IPv4.gateway=xxx.xxx.xxx.xxx.
IPv6.method=off
IPv6.privacy=disabled
Nameservers=x.x.x.x;y.y.y.y;
Domains=mydomain.com;
Timeservers=ntp1.mydomain.com;ntp2.mydomain.com;
Modified=2017-04-14T01:16:46.603301Z
root@xxxx:/etc/ssh#
If I understood you correctly you want to provision your device with
above settings via option 2).
In this case you cann add a config file to /var/lib/connman, let's say
it is called homenet.config. The content might look like:
"""
[service_home_ethernet]
Type = ethernet
IPv4 = 192.168.1.42/255.255.255.0/192.168.1.1
IPv6 = 2001:db8::42/64/2001:db8::1
MAC = 01:02:03:04:05:06
Nameservers = 10.2.3.4,192.168.1.99
SearchDomains =
my.home,isp.net
Timeservers =
10.172.2.1,ntp.my.isp.net
Domain = my.home
"""
The all available fields should be documented in the
connman-service.config man page or in [2]. If the man page is something
missing please let us know. We just had the case that the man page was
lacking some information.
NOTE: The section name needs to start with the prefix "service_". The
matching is done via the MAC address.
HTH!
Thanks,
Daniel
[1]
https://wiki.archlinux.org/index.php/ConnMan
[2]
https://git.kernel.org/pub/scm/network/connman/connman.git/tree/doc/confi...