I’m having trouble getting a Balena Fin v1.1 device to connect to the internet using mPCIe cellular modem EC25-A with a Twilio SIM card. If I leave ethernet disconnected, then the device never establishes a connection to the Balena dashboard. I found another topic very similar to my issue where the advice was to create a new blank Application and poke at some ModemManager and NetworkManager things. So here goes:
My Balena Fin is running a new blank application with the default “Factory build” - no services. I inserted the Twilio SIM and booted up the device. Nothing happened, the device did not show up on the dashboard - Okay, so that’s probably expected since I haven’t told balena to use the connection, so I plugged in the ethernet cable and bam, new device detected, etc. Fine.
The modem should be registered and connected if all is well so far I think, so next I start a terminal session to the host:
mmcli -L
root@localhost:~# mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module
mmcli -m 0
root@localhost:~# mmcli -m 0
-----------------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: 2eaa2d42ff00984d7b4f1d73f1d27d1395914a37
-----------------------------------
Hardware | manufacturer: QUALCOMM INCORPORATED
| model: QUECTEL Mobile Broadband Module
| firmware revision: EC25AFAR05A04M4G
| carrier config: Commercial-TMO
| carrier config revision: 05010524
| h/w revision: 10000
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 861641041894105
-----------------------------------
System | device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2
| drivers: option1, qmi_wwan
| plugin: Quectel
| primary port: cdc-wdm0
| ports: ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net),
| ttyUSB3 (at)
-----------------------------------
Numbers | own: 19044226780
-----------------------------------
Status | lock: sim-pin2
| unlock retries: sim-pin (3), sim-pin2 (10), sim-puk (10), sim-puk2 (10)
| state: registered
| power state: on
| access tech: lte
| signal quality: 62% (recent)
-----------------------------------
Modes | supported: allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: 3g
| allowed: 3g, 4g; preferred: 4g
| current: allowed: 3g, 4g; preferred: 4g
-----------------------------------
Bands | supported: utran-4, utran-5, utran-2, eutran-2, eutran-4, eutran-12
| current: utran-4, utran-5, utran-2, eutran-2, eutran-4, eutran-12
-----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
-----------------------------------
3GPP | imei: 861641041894105
| operator id: 310260
| registration: home
-----------------------------------
3GPP EPS | ue mode of operation: csps-1
-----------------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
Modem appears to be registered. Everything seems ok?
journalctl -a -u ModemManager --no-pager
root@localhost:~# journalctl -a -u ModemManager --no-pager
-- Logs begin at Fri 2020-01-31 10:38:40 UTC, end at Tue 2020-05-05 06:06:16 UTC. --
May 05 05:37:30 localhost ModemManager[820]: ModemManager (version 1.12.4) starting in system bus...
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] Opening device with flags 'version-info, proxy'...
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] loaded driver of cdc-wdm port: qmi_wwan
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] created endpoint
May 05 05:37:32 localhost ModemManager[820]: cannot connect to proxy: Could not connect: Connection refused
May 05 05:37:32 localhost ModemManager[820]: spawning new qmi-proxy (try 1)...
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] Checking version info (20 retries)...
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] QMI Device supports 29 services:
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] ctl (1.5)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] wds (1.67)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] dms (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] nas (1.25)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] qos (1.12)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] wms (1.10)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] auth (1.3)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] at (1.2)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] voice (2.1)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] cat2 (2.24)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] uim (1.46)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] pbm (1.4)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] test (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] loc (2.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] sar (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] ims (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] ts (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] tmd (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] wda (1.16)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] csvt (1.1)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] imsp (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] imsa (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] coex (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] pdc (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] rfrpe (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] dsd (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] unknown [0x2d] (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] unknown [0x30] (1.0)
May 05 05:37:32 localhost ModemManager[820]: [/dev/cdc-wdm0] unknown [0x36] (1.0)
May 05 05:37:33 259a3d1 ModemManager[820]: Couldn't check support for device '/sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc2/mmc2:0001/mmc2:0001:1': not supported by any plugin
May 05 05:37:33 259a3d1 ModemManager[820]: Couldn't check support for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1': not supported by any plugin
May 05 05:37:41 259a3d1 ModemManager[820]: (tty/ttyUSB0) failed to parse QCDM version info command result: -7
May 05 05:37:41 259a3d1 ModemManager[820]: [device /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2] creating modem with plugin 'Quectel' and '6' ports
May 05 05:37:41 259a3d1 ModemManager[820]: Could not grab port (tty/ttyUSB1): 'Cannot add port 'tty/ttyUSB1', unhandled serial type'
May 05 05:37:41 259a3d1 ModemManager[820]: Modem for device '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2' successfully created
May 05 05:37:41 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Opening device with flags 'version-info, proxy'...
May 05 05:37:41 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] loaded driver of cdc-wdm port: qmi_wwan
May 05 05:37:41 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] created endpoint
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Checking version info (20 retries)...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] QMI Device supports 29 services:
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] ctl (1.5)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] wds (1.67)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] dms (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] nas (1.25)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] qos (1.12)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] wms (1.10)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] auth (1.3)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] at (1.2)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] voice (2.1)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] cat2 (2.24)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] uim (1.46)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] pbm (1.4)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] test (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] loc (2.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] sar (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] ims (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] ts (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] tmd (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] wda (1.16)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] csvt (1.1)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] imsp (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] imsa (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] coex (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] pdc (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] rfrpe (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] dsd (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] unknown [0x2d] (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] unknown [0x30] (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] unknown [0x36] (1.0)
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Reading expected data format from: /sys/class/net/wwan0/qmi/raw_ip
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'wda' (version 1.16) client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Writing expected data format to: /sys/class/net/wwan0/qmi/raw_ip
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Reading expected data format from: /sys/class/net/wwan0/qmi/raw_ip
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Releasing 'wda' client with flags 'release-cid'...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Unregistered 'wda' client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '3'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'wms' (version 1.10) client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'uim' (version 1.46) client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'loc' (version 2.0) client with ID '1'
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Allocating new client ID...
May 05 05:37:42 259a3d1 ModemManager[820]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '1'
May 05 05:37:43 259a3d1 ModemManager[820]: Unhandled QMI radio interface (9)
May 05 05:37:43 259a3d1 ModemManager[820]: Unhandled QMI radio interface (9)
May 05 05:37:43 259a3d1 ModemManager[820]: Unhandled QMI radio interface (9)
May 05 05:37:44 259a3d1 ModemManager[820]: Modem: state changed (unknown -> disabled)
May 05 05:37:44 259a3d1 ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
May 05 05:37:45 259a3d1 ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
May 05 05:37:45 259a3d1 ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
May 05 05:37:45 259a3d1 ModemManager[820]: Couldn't load Operator Name: 'Current operator description is still unknown'
May 05 05:37:45 259a3d1 ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
May 05 05:37:45 259a3d1 ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabled -> registered)
May 05 06:01:55 localhost.localdomain ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (home -> idle)
May 05 06:01:55 localhost.localdomain ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> enabled)
May 05 06:01:55 localhost.localdomain ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (idle -> registering)
May 05 06:01:55 localhost.localdomain ModemManager[820]: Couldn't load Operator Name: 'Current operator description is still unknown'
May 05 06:01:55 localhost.localdomain ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
May 05 06:01:55 localhost.localdomain ModemManager[820]: Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabled -> registered)
I haven’t really told NetworkManager to do anything with this modem yet, but let’s have a poke at NM anyway.
nmcli c
root@localhost:~# nmcli c
NAME UUID TYPE DEVICE
Wired connection 1 7f8ca23b-379f-3b80-9c60-db733363fb61 ethernet eth0
supervisor0 a991eef0-6cd5-42e8-9b1e-d489d72e6639 bridge supervisor0
Kind of expected, I think. I haven’t added any system-connections
files so far. Time to add a config for the modem to tell BalenaOS to use it.
<see next post, ran out of characters!>