Configuring cellular modem with balena

Hi!

I’m trying to configure RPi4 balena device to work with a cellular modem.
For this purpose, I started by generating a new image for the device using the

balena os download
balena preload
balena register (to get a new UUID for the device)

cli commands, and then the following command to configure the modem:

balena os configure device.img --device $UUID --config-network ethernet --config-app-update-poll-interval 10 --version v2.51.1+rev1 --system-connection ./cellular

where my cellular file is:

[connection]
id=cellular
type=gsm
autoconnect=true

[gsm]
auto-config=true

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

After executing the command, I see the output:

Configuring operating system image
Copied system-connection file: cellular

And I indeed see the cellular file had been copied to the /resin-boot/system-connections/ volume of the SD card.

However, after inserting the SD card into the device, connecting the modem to it, and booting it,
There is no internet connectivity.
Examining the device by connecting it to ethernet, additionally reveals that:

  • There is only eth0 interface, as well as balena0, br-8c51e5045d3d, lo, resin-dns, resin-vpn, supervisor0, wlan0 interfaces, no modem related interface.
  • no /dev/ttyACM* or /dev/ttyUSB* exists
  • lsusb doesn’t show the modem neither
  • dmesg doesn’t show anything related to the modem
  • the cellular file is not at /resin-boot/system-connections/

A few more points to note:

  • I’m using the latest balena-cli - 12.10.1

  • The same modem with the same SIM card works automatically without any issues on another Pi device with regular Raspbian OS.

Would appreciate your help configuring the device to work with the modem.

Thank you in advance!
Vitaliy

Hi Vitaliy,
could you please let us know which modem you are using? We are testing with the modems specified in our docs - https://www.balena.io/docs/reference/OS/network/2.x/#known-tested-modems
if your modem is not on the list it is possible we are missing a kernel module.

Hi Michal,

We’ve tested it with a number of very common modem models:

  • Telit LE910-EU v2
  • Telit LE910C1-EU
  • Simcom SIM7100E
  • Quectel EC25-E
  • Provision PR-LTE01W

I see in the list of supported modems you shared, the Quectel EC20 and Simcom SIM7600E models, which use the same ACM-CDC driver, as most of the other modems we tested.

Moreover, the Quectel EC25-E is very close to Quectel EC20, and similarly SIM7100E to SIM7600E. which balenaOS officially supports.

Therefore I assume that this is not a driver issue, but rather some kind of a miss-configuration.

Will appreciate your help finding it.

Many Thanks!
Vitaliy

Hi Ryan, could you please provide us with some log files? For example, using the Quectel EC25-E, could you please post the output of:

  • dmesg
  • mmcli -L
  • mmcli -m 0
  • lsmod
    Thanks,

Sure Alex!

Please find attached dmesg & lsmod output:
dmesg.log (24.2 KB) lsmod.log (2.5 KB)

The response of mmcli is:

mmcli -L
No modems were found
mmcli -m 0
error: couldn’t find modem at ‘/org/freedesktop/ModemManager1/Modem/0’

Many Thanks!
Vitaliy

Would it be possible for you to enable support access as our device team would like to examine the device a little more closely?

Sure!
When would you like to schedule it?

If possible, enabling support access for a week would likely cover the duration of the investigation (it also relies on when the team will get a chance to take a look). Is this ok?

No problem, access granted.
Please let me know if you need anything else from me to investigate the issue.

Many Thanks!
Vitaliy

Can you please send me the dashboard link to the device in a private message or here - both are safe.

Sure:
https://dashboard.balena-cloud.com/devices/1ecde9c9d7628e7ff27f89f603bc6aab/summary

Hi Vitaliy,

Thanks for sending the link. I will check the device now.

Thanks,
Zahari

Is the modem connected to the RPi through an adapter like this: https://techship.com/products/mpcie-to-usb-adapter-card/? If not, how is it connected more specifically?

Yes, it is.

Ok, I have one of those adapters here. Let me download the exact same OS version and try this on a rpi4 64 build like yours.

Great, thanks!

Please note that it’s RPi4 B+ 8GB RAM model.

On your device usb-devices shows only this:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.75 dwc_otg_hcd
S:  Product=DWC OTG Controller
S:  SerialNumber=fe980000.usb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

On mine I see:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.75 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev=04.20
S:  Product=USB2.0 Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=05c6 ProdID=9215 Rev=02.28
S:  Manufacturer=Quectel
S:  Product=Quectel LTE Module
C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
I:  If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=04.19
S:  Manufacturer=Linux 4.19.75 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.75 dwc_otg_hcd
S:  Product=DWC OTG Controller
S:  SerialNumber=fe980000.usb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

Even without the modem I see all four USB entries:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.75 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev=04.20
S:  Product=USB2.0 Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=04.19
S:  Manufacturer=Linux 4.19.75 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.75 dwc_otg_hcd
S:  Product=DWC OTG Controller
S:  SerialNumber=fe980000.usb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

Let’s repeat on your side exactly what I did. I created a new empty application. Then downloaded an OS image directly from the dashboard - for test purposes I am using a dev version from there since it is more easily accessible from the local network with our CLI. Then check whether the usb controller reports all four ports with usb-devices - no need to plug-in the modem. If the four USB entries are not showing up as they should that would most probably mean that the USB controller is damaged.

Did you test it on RPi4 B+ 8GB RAM model?

Let me see what is the memory size as I do not remember exactly. I have only one RPi4 B+ here.

Yours is a newer model indeed:

root@1ecde9c:~# cat /proc/cpuinfo
...
Hardware        : BCM2835
Revision        : d03114
Serial          : 10000000ab5b30d6
Model           : Raspberry Pi 4 Model B Rev 1.4

Mine is:

Hardware	: BCM2835
Revision	: a03111
Serial		: 100000004ab5c919
Model		: Raspberry Pi 4 Model B Rev 1.1

Let me ping our team and see if somebody has that Rev 1.4 8GB model.