Hi Mike,

On ma, 2014-07-07 at 11:02 -0400, Mike Purvis wrote:
> Hi,
> 
> 
> I'm now running 1.24.
> 
> 
> It looks like I have /var/lib/connman/settings file which resembles
> "example.config" file supplied in the documentation. However, having
> added an item to it, no behaviour seems to change.

Do not touch those settings files found in /var/lib/connman and its
sub-directories, they are for ConnMan internal use only.


> 
> 
> [global]
> OfflineMode=false
> 
> 
> [Wired]
> Enable=true
> Tethering=false
> 
> 
> [WiFi]
> Enable=true
> Tethering=false
> 
> 
> [Bluetooth]
> Enable=true
> Tethering=false
> 
> 
> [service_xyz]
> Type=ethernet
> IPv4=192.168.1.1/255.255.255.0

Just move the above three liner configuration snippet
to /var/lib/connman/ethernet.config file. This is all documented in
config-format.txt file, did you really read it?
BTW, normally the gateway (3rd parameter) is needed in IPv4 settings,
are you sure you do not need it?

> 
> 
> According to connmand -h, though, the default config location is
> actually /etc/connman/main.conf— so I copied the settings file (with
> my addition) to that file, and then started the daemon in the
> foreground. Looks like it's actually reading the file now, but not
> able to act on it:

main.conf is documented in src/main.conf file. That file is user
configurable and normally found in /etc/connman directory. By default
the file does not exists as ConnMan will use sane default values.


> 
> 
> administrator@jackal:/etc/connman$ sudo connmand -n
> connmand[4245]: Connection Manager version 1.24
> connmand[4245]: Unknown group global in main.conf
> connmand[4245]: Unknown group Wired in main.conf
> connmand[4245]: Unknown group WiFi in main.conf
> connmand[4245]: Unknown group Bluetooth in main.conf
> connmand[4245]: Unknown group service_xyz in main.conf
> connmand[4245]: Checking loopback interface settings

So do not put contents of /var/lib/connman/settings
into /etc/connman/main.conf, it will not work as you noticed.

> 
> 
> I also tried moving my service definition
> to /var/lib/connman/example.config, but this registered no response
> either.

So you are saying that even with this file, the system does not set the
IP address of the ethernet interface when you plug in the ethernet
cable? Note that ethernet cable (with other end connected to switch)
needs to be plugged in before connman will handle the interface.
If so, please supply debug log of the issue (use pastebin or similar
service for the log file). Start connman with -d option to get the debug
log.


Cheers,
Jukka


> 
> 
> In the short term, I've used the -I flag to allow me to set the static
> IP of this device using /etc/network/interfaces, which seems to work
> okay. However, I'd like to understand how to set this using connman's
> configuration.
> 
> 
> Thanks,
> 
> 
> Mike
> 
> 
> On 7 July 2014 07:54, Jukka Rissanen <[email protected]>
> wrote:
>         Hi Mike,
>         
>         On ma, 2014-07-07 at 07:41 -0400, Mike Purvis wrote:
>         > Hi Jukka,
>         >
>         >
>         > Very helpful, thanks— not sure why it didn't occur to me to
>         look in
>         > the source repo itself for docs. For others following along,
>         the
>         > config file documentation is
>         > here:
>         
> http://git.kernel.org/cgit/network/connman/connman.git/tree/doc/config-format.txt
>         >
>         >
>         > Is there a PPA or other debian source for getting the
>         currently
>         > recommended connman version, or is it basically down to
>         building it
>         > from source?
>         
>         
>         I am not using debian and anyway build connman from source. If
>         you want
>         to build from sources in debian, the latest scripts can be
>         found at
>         https://github.com/pfl/connman-deb
>         
>         >
>         >
>         > Looks like 1.21 is the version currently in sid, so that one
>         can be
>         > had as a sourcedeb without much trouble. Is that adequate,
>         or is it
>         > best to be right on the current release?
>         
>         
>         If you have a choice, then I would suggest using the very
>         latest
>         version. We try hard to keep the released versions in good
>         shape so it
>         is safe to take the latest version.
>         
>         
>         Cheers,
>         Jukka
>         
>         
>         
>         >
>         >
>         > Thanks again,
>         >
>         >
>         > Mike
>         >
>         >
>         > On 7 July 2014 03:58, Jukka Rissanen
>         <[email protected]>
>         > wrote:
>         >         Hi Mike,
>         >
>         >         On pe, 2014-07-04 at 13:45 -0400, Mike Purvis wrote:
>         >         > Hey all,
>         >         >
>         >         > I have a platform where I'd like an ethernet port
>         to come up
>         >         with a static
>         >         > IP, much as it does with /etc/network/interfaces
>         containing:
>         >         >
>         >         > auto p5p1
>         >         > iface p5p1 inet static
>         >         >   address 192.168.54.1
>         >         >   netmask 255.255.255.0
>         >         >
>         >         > This is essential so that a user can set a static
>         IP on
>         >         their laptop, and
>         >         > then SSH into the device in order to configure the
>         wireless,
>         >         etc.
>         >         >
>         >         > However, it doesn't seem possible to do this under
>         connman—
>         >         without a wire
>         >         > connected to the ethernet port, no wired services
>         are shown,
>         >         so I have no
>         >         > opportunity to do:
>         >         >
>         >         > connmanctl config <service> --ipv4 ...
>         >         >
>         >         > Is there a way to do this which I'm not seeing?
>         >
>         >
>         >         Yes, there is limited workaround so you can create
>         a .config
>         >         file that
>         >         setups the ethernet port automatically when it comes
>         up. See
>         >         doc/config-format.txt in connman sources for
>         details. Note
>         >         that a
>         >         service becomes immutable if provisioned via .config
>         file so
>         >         user is
>         >         only able to tweak very limited settings for the
>         service in
>         >         this case.
>         >
>         >         >  Alternatively, can connman
>         >         > be set up to ignore my ethernet port and manage
>         only the
>         >         wifi?
>         >
>         >
>         >         Yes, you can start connman with -I command line
>         option to
>         >         ignore some
>         >         network interfaces.
>         >
>         >         >
>         >         > I apologize for the elementary question— the best
>         docs I've
>         >         been able to
>         >         > find are those on the Arch Linux wiki:
>         >         > https://wiki.archlinux.org/index.php/Connman
>         >         >
>         >         > I'm using connman v1.15, via the Ubuntu 14.04 deb
>         package.
>         >
>         >
>         >         Please upgrade connman if possible, we have fixed
>         lot of nasty
>         >         bugs
>         >         after 1.15.
>         >
>         >
>         >         Cheers,
>         >         Jukka
>         >
>         >
>         >
>         >
>         
>         
>         
> 
> 


_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to