I have a Bela.io (BeagleBone) device, which when attached to the PC (here Ubuntu 18.04 laptop) via USB, appears in Ubuntu as a Wired network connection (it also adds a removable drive, but that's irrelevant here).

I want to set this network connection to be shared, with a fixed IP address - so, I start nm-connection-manager, edit "Wired Connection 2" so it is shared, with a fixed IP, and a new name (say "Bela USB Wired Connection"), and save.

However, if I disconnect and then reconnect the device via USB, the previously set-up "Bela USB Wired Connection" is ignored, and again I get a new "Wired Connection 2" set up!

So, how can I have Network Manager re-use the "Bela USB Wired Connection" whenever attach this device - and not create a new wired connection?

I have seen:

... but of those that have answers, I cannot see how I could apply them to my case.

I have explored a bit the logs from /var/log/syslog from the laptop PC host, and compared it for two subsequent USB pluggings of the device; the crucial differences are:


Oct 11 13:35:19 MyPC kernel: [ 983.661561] rndis_host 1-4:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-4, RNDIS device, 3e:a9:60:13:f2:52

vs

Oct 11 13:37:38 MyPC kernel: [ 1122.116079] rndis_host 1-4:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-4, RNDIS device, 2e:ea:41:0f:0c:53

So whatever this MAC-address-like looking number/string is, it changed between the two pluggings.


Oct 11 13:35:19 MyPC NetworkManager[897]: [1539257719.9145] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/6)

vs

Oct 11 13:37:38 MyPC NetworkManager[897]: [1539257858.3699] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/7)

Consequently, Network Manager created new devices for that.


[1539257720.0062] device (enp0s20f0u4): Activation: starting connection 'Wired connection 2' (7e88a52c-567c-3544-acd5-89ae8e1e743f)

vs

[1539257858.4612] device (enp0s20f0u4): Activation: starting connection 'Wired connection 2' (c2a38d82-566d-37db-b4b1-969ac7dc1614)

Consequenctly, the network connections created by Network Manager have different GUIDs - even if they have the same (auto-assigned) name, 'Wired connection 2'


I have also tried monitoring dbus on laptop PC host during connection - but nothing interesting there:

$ dbus-monitor --system "interface='org.freedesktop.NetworkManager'"
...
signal time=1539258546.379651 sender=:1.13 -> destination=(null destination) serial=3770 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=DeviceAdded
   object path "/org/freedesktop/NetworkManager/Devices/8"
signal time=1539258546.387360 sender=:1.13 -> destination=(null destination) serial=3773 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=PropertiesChanged
   array [
      dict entry(
         string "AllDevices"
         variant             array [
               object path "/org/freedesktop/NetworkManager/Devices/1"
               object path "/org/freedesktop/NetworkManager/Devices/2"
               object path "/org/freedesktop/NetworkManager/Devices/3"
               object path "/org/freedesktop/NetworkManager/Devices/8"
            ]
      )
      dict entry(
         string "Devices"
         variant             array [
               object path "/org/freedesktop/NetworkManager/Devices/1"
               object path "/org/freedesktop/NetworkManager/Devices/2"
               object path "/org/freedesktop/NetworkManager/Devices/3"
               object path "/org/freedesktop/NetworkManager/Devices/8"
            ]
      )
   ]
signal time=1539258546.462072 sender=:1.13 -> destination=(null destination) serial=3789 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=PropertiesChanged
   array [
      dict entry(
         string "ActiveConnections"
         variant             array [
               object path "/org/freedesktop/NetworkManager/ActiveConnection/1"
            ]
      )
   ]
signal time=1539258546.476544 sender=:1.13 -> destination=(null destination) serial=3808 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=PropertiesChanged
   array [
      dict entry(
         string "ActiveConnections"
         variant             array [
               object path "/org/freedesktop/NetworkManager/ActiveConnection/1"
            ]
      )
   ]
signal time=1539258546.485483 sender=:1.13 -> destination=(null destination) serial=3813 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=PropertiesChanged
   array [
      dict entry(
         string "ActiveConnections"
         variant             array [
               object path "/org/freedesktop/NetworkManager/ActiveConnection/6"
               object path "/org/freedesktop/NetworkManager/ActiveConnection/1"
            ]
      )
   ]
signal time=1539258546.490596 sender=:1.13 -> destination=(null destination) serial=3820 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=PropertiesChanged
   array [
      dict entry(
         string "ActivatingConnection"
         variant             object path "/org/freedesktop/NetworkManager/ActiveConnection/6"
      )
      dict entry(
         string "ActiveConnections"
         variant             array [
               object path "/org/freedesktop/NetworkManager/ActiveConnection/6"
               object path "/org/freedesktop/NetworkManager/ActiveConnection/1"
            ]
      )
   ]

(ActiveConnection/1 is presumably my WiFi).

Is there any way I can set up this connection in Network Manager on the PC, so the named one with prepared settings is used each time I plug in the device to the PC USB - instead of having a new one created each time I plug it in?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.