LTE Connection using NetworkManager


#1

Hi All,

Based on the documentation for ResinOS 2.0 it looks like the new approach to getting cellular connectivity is to create a NetworkManager config in the boot partition, in the system-connections directory. Is this really all that needs to be done, or is there more magic involved? We’ve got the qmi_wwan module compiled in our new resin build, and the network interface is being created properly, however I can’t see any evidence that NM / MM is really trying to use the config from the boot partition to establish a connection. Is there anything extra we should try to make it work? The connection configuration has been taken from a working NM config on a standard Ubuntu setup, so I know it’s kosher.

Thanks!


#2

Hi @cmoss, not an expert on this but I’m being told you can try to use nmcli to debug the connection on a resinos.io image (so that you can run the commands on the host).
Maybe seeing some logs (journalctl, dmesg) would also help us see what might be wrong.
Cheers!


#3

Actually, it looks like the connection isn’t being used by the HostNetwork manager at all. Here’s the output regarding currently available connections, retrieved from a container over dbus:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host_run/dbus/system_bus_socket \
> python ./info.py
Version:                       1.4.2
Hostname:                      50b369c
Can modify:                    False
Networking enabled:            True
Wireless enabled:              False
Wireless hw enabled:           True
Wwan enabled:                  True
Wwan hw enabled:               True
Wimax enabled:                 False
Wimax hw enabled:              False
Overall state:                 connected_global

Permissions
checkpoint-rollback:           yes
enable-disable-network:        yes
enable-disable-statistics:     yes
enable-disable-wifi:           yes
enable-disable-wimax:          yes
enable-disable-wwan:           yes
network-control:               yes
reload:                        yes
settings.modify.global-dns:    yes
settings.modify.hostname:      yes
settings.modify.own:           yes
settings.modify.system:        yes
sleep-wake:                    yes
wifi.share.open:               yes
wifi.share.protected:          yes

Available network devices
Name       State               Driver               Managed?
lo         unmanaged           unknown              False
enp1s0     activated           r8169                True
enp2s0     unavailable         r8169                True
sit0       unmanaged           sit                  False
cdc-wdm0   disconnected        qmi_wwan             True
docker0    unmanaged           bridge               False
resin-vpn  unmanaged           tun                  False
br-3ae87b442d6b unmanaged           bridge               False
clients    unmanaged           bridge               False
wlp0s16f7u7 unavailable         rtl8812au            True
br-677b912af32a unmanaged           bridge               False
vethf0590f3 unmanaged           veth                 False
veth849fc5b unmanaged           veth                 False
vethb8de33d unmanaged           veth                 False
veth6762f20 unmanaged           veth                 False
veth12835cd unmanaged           veth                 False
veth5246eb5 unmanaged           veth                 False

Available connections
Name                           Type
Wired connection 1             802-3-ethernet
Wired connection 2             802-3-ethernet

Active connections
Name                           Type                 Default    Devices
Wired connection 1             802-3-ethernet       True       enp1s0

The LTE Module is being picked up by NM, and being managed, however the LTE connection as saved in the system-connections boot directory isn’t even registered. We’re going to build an image which enables SSH access to the host today, so I’ll be able to do more debugging later.

Cheers.


#4

I’ve since manually created an NM connection setting for my LTE connection via DBUS, and activated it, also using DBUS, and it’s starting up perfectly - if anyone is looking for a straightforward way to control the host NetworkManager from a container, I can highly recommend this high-level Python interface here:

Just don’t forget to tell it where the dbus socket is hiding, i.e.:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host_run/dbus/system_bus_socket

As soon as our host image with the correct SSH cert is built, I’ll find out why the original boot partition config isn’t being used.


#5

Chatting about this internally, it should just work by default when everything is set up fine. We’ve ordered some modems like this, and will be testing it out (likely @shaunmulligan, our 4G wizard :satellite:). Let you know if we figure out anything further, or would be happy to hear if you have any more info in the meantime!