2

Short Version

How can I used connmanctl to set a static IP address for an Ethernet interface on a Beaglebone Black running Debian 9 - prior to connecting the device to an Ethernet cable?

Longer Version

I'm trying to set a static IP address for an Ethernet interface (eth0) on a Beaglebone Black running Debian 9. I've found instructions online that seem to be working, e.g.:

They suggest the following steps:

  1. Connect a working Ethernet cable to a LAN port

  2. Get the ConnMan service name, e.g.:

    user@host:~$ connmanctl services
    *AO Wired                ethernet_6ceceb5cc3e2_cable
    
  3. Set the static IP through ConnMan, e.g.:

    user@host:~$ sudo connmanctl config ethernet_6ceceb5cc3e2_cable --ipv4 manual 10.0.10.0 255.255.0.0
    

The problem for me is that I would like to configure the device before it's connected to a network via Ethernet. But the connmanctl services command doesn't produce any output until I do.

1 Answer 1

1

Have you tried using a provisioning file?

Here is a minimal example for /var/lib/connman/default.config:

[service_eth0]
Type = ethernet
IPv4 = 10.0.10.0/255.255.0.0

Connman should use this configuration, if there's none available in /var/lib/connman/ethernet*.

You can find more details and examples in the connman manpages, e.g. https://www.mankier.com/5/connman-service.config

1
  • What if I have two interface, eth0 and eth1? Can I configure them somehow? It seems that "eth0" in "service_eth0" is meaningless and serves only as unique identifier of service. To be honest connman seems to be incredibly poorly documented - there are manpages and all, but it seems that basically what I can do with it (using commandline) is configure eduroam, and if I want static IPs on multiple interfaces I should blacklist them and configure using /etc/network/interfaces - this seems suboptimal to say the least. Apr 28, 2020 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .