I’m trying to make a consistent connection to a cellular network using a Quectel EC25-A modem. The problem I’m having is, at startup, the network-manager snap fails to connect to the modem (log below). The weird thing is that it doesn’t happen on every bootup. From what I’ve observed so far, when I do a warm boot (using sudo reboot) the modem connects successfully every time. The problem occurs (inconsistently) on cold boots. I looked around a bit and found this bug (which is my main suspect at the moment). Whenever the modem fails to connect, I get the “invalid bearer IP configuration” error. I’m using UC18 btw.
Sep 03 16:01:55 linux NetworkManager[927]: <info> [1599148915.5577] policy: auto-activating connection 'CELLULAR'
Sep 03 16:01:55 linux NetworkManager[927]: <info> [1599148915.5639] device (cdc-wdm0): Activation: starting connection 'CELLULAR' (8af051c3-905e-49f4-bdc4-fb1d0654c76e)
Sep 03 16:01:55 linux NetworkManager[927]: <info> [1599148915.5652] device (cdc-wdm0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 03 16:01:55 linux NetworkManager[927]: <info> [1599148915.5689] device (cdc-wdm0): state change: prepare -> need-auth (reason 'none', sys-iface-state: 'managed')
Sep 03 16:01:55 linux NetworkManager[927]: <info> [1599148915.5841] device (cdc-wdm0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 03 16:01:56 linux NetworkManager[927]: <info> [1599148916.2557] modem["cdc-wdm0"]: modem state changed, 'enabling' --> 'enabled' (reason: user-requested)
Sep 03 16:02:00 linux NetworkManager[927]: <info> [1599148920.4227] modem["cdc-wdm0"]: modem state changed, 'enabled' --> 'searching' (reason: unknown)
Sep 03 16:02:42 linux NetworkManager[927]: <info> [1599148962.8436] modem["cdc-wdm0"]: modem state changed, 'searching' --> 'registered' (reason: unknown)
Sep 03 16:02:43 linux NetworkManager[927]: <info> [1599148963.1666] modem["cdc-wdm0"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Sep 03 16:02:43 linux NetworkManager[927]: <info> [1599148963.5781] modem["cdc-wdm0"]: modem state changed, 'connecting' --> 'connected' (reason: user-requested)
Sep 03 16:02:43 linux NetworkManager[927]: <warn> [1599148963.5866] modem-broadband[cdc-wdm0]: failed to connect modem: invalid bearer IP configuration
Sep 03 16:02:43 linux NetworkManager[927]: <info> [1599148963.5868] device (cdc-wdm0): state change: prepare -> failed (reason 'config-failed', sys-iface-state: 'managed')
Do I have to make a snap that includes this shell script to get around this problem? Does anyone know if there is one already made? Thanks
#!/bin/bash
mmcli -m 0 -b 0 --connect
ifconfig wwan0 up
mmcli -m 0 -b 0
dhclient -d wwan0 &
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Snap versions:
core18 20200724 1889 latest/stable canonical✓ base
modem-manager 1.10.0-4 416 1.10/stable canonical✓ -
network-manager 1.10.6-8 593 1.10/stable canonical✓ -
snapd 2.45.3.1 8792 latest/stable canonical✓ snapd