Cellular modem connection failed

Hey I try to connect Sierra HL8515 modem with BalenaOS.
I followed instructions on https://www.balena.io/docs/reference/OS/network/2.x/#cellular-modem-setup and it’s failed. I am able to do AT command on serial port but ModemManager don’t establish connection.

My cellular file on /boot/system-connections
[connection]
id=cellular
type=gsm
autoconnect=true

[gsm]
apn=orange.re
password=orange
username=orange

[serial]
baud=115200

[ipv4]
method=auto

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

Logs of modem manager :

root@b1e6c09:/mnt/boot# journalctl -u ModemManager -f
-- Logs begin at Thu 2019-11-21 06:18:59 UTC. --
Nov 21 07:56:25 b1e6c09 ModemManager[6233]: (tty/ttyUSB2): released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1'
Nov 21 07:56:25 b1e6c09 ModemManager[6233]: (tty/ttyUSB3): released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1'
Nov 21 07:56:25 b1e6c09 ModemManager[6233]: (ttyUSB0): could not re-acquire serial port lock: (5) Input/output error
Nov 21 07:57:05 b1e6c09 ModemManager[6233]: Couldn't check support for device '/sys/devices/soc0/soc/2100000.aips-bus/2188000.ethernet': not supported by any plugin
Nov 21 07:57:05 b1e6c09 ModemManager[6233]: Couldn't check support for device '/sys/devices/soc0/soc/2100000.aips-bus/2190000.usdhc/mmc_host/mmc1/mmc1:0001/mmc1:0001:2/wl18xx.0.auto': not supported by any plugin
Nov 21 07:57:17 b1e6c09 ModemManager[6233]: (ttyUSB0): serial port closing_wait was reset!
Nov 21 07:57:17 b1e6c09 ModemManager[6233]: [device /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1] creating modem with plugin 'Generic' and '1' ports
Nov 21 07:57:17 b1e6c09 ModemManager[6233]: Could not grab port (tty/ttyUSB0): 'Cannot add port 'tty/ttyUSB0', unhandled serial type'
Nov 21 07:57:17 b1e6c09 ModemManager[6233]: Couldn't create modem for device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1': Failed to find primary AT port
Nov 21 07:57:17 b1e6c09 ModemManager[6233]: (ttyUSB0): serial port closing_wait was reset!

I try with Huawei dongle key and it’s work fine.

Do you think i need to add udev rules ?

Thanks,
Ben

Hi Ben,

Quite possibly ModemManager does not support this modem model.

One useful command to run is usb-devices so that it could be seen whether necessary drivers were loaded by the OS for this modem. Please paste the fragment from the command involving the modem here. If it is a missing driver then there is a bigger chance this could be make to work.

Also it would be useful to try it out the modem on another Linux distribution. One that has a more recent version of ModemManager, e.g. Arch Linux. Latest Ubuntu should be fine.

Also what is the device type you are using?

Thanks,
Zahari

root@b1e6c09:~# usb-devices
....
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev=06.00
S:  Manufacturer=FTDI
S:  Product=TTL232R-3V3
S:  SerialNumber=FTHEAQMQ
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=90mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
....

I use a FTDI cable to interface modem UART and my board. I think ModemManager don’t able to use FTDI interface to send AT command.

I have another modem sierra WP8548 which have an usb port. When I plug usb modem on board, I have 3 interfaces : ttyUSB0, ttyUSB1, ttyUSB2, ModemManager recognize modem, use his sierra plugin to setting it and I am able to have an internet connection.

Can I force ModemManager to use the ftdi interface like a Sierra modem ?

Ben

Hi Ben,

Sorry for the late response. I understand now. I do not think FTDI will be possible with ModemManager. I have some follow up questions though.

I tried looking up HL8515 for Sierra Wireless, but I could not find any matches. I see HL8518 though, which has both UART and USB. Is your chipset HL8518 actually?

It looks like the correct way to connect the modem is through the USB interface, not through UART.

Are you using a development board for it and if not what is the product that integrates the module? Can you let me know the model?

Also what is the balena device type you are using? A RPi 3 or another one? Asking as there are differences in the kernels used.

Thanks,
Zahari

Hi @majorz,

Thanks for your feedback.

Yes my chipset is HL8515. I work with MangoH red development board with it. I tested to connect with the USB interface but there aren’t none virtual interface linked with it. I don’t able to do simple AT command.

My balena device is a custom board based on Hummingboard2.

Thanks,
Ben

Hi Ben,

How will the cellular chip be connected to the Hummingboard? If you are using mPCIe or USB-A then the board will be able to communicate with the cellular chip through USB directly and you won’t be using a serial/USB bridge. That means that the board will use the appropriate drivers for the chip instead of going through a bridge.

I see the MangoH board has a CF3 socket, but I am not familiar with its characteristics and driver support.

Thanks,
Zahari

Hi @majorz,

Cellular chip is connected on Humming board on USB interface. Like I said on my second post, I have an other chipset the WP8545. It is a processor which embedded HL8515 cellular modem. With it I am able to communication via USB linking CF3 mangoH red board and my hummingboard. ttyUSBx interfaces is automatically created on HostOS.

With HL8515, I don’t have this interfaces. I think this chipset don’t have usb driver integrated and it’s only addressable with his UART.

Do you know if there are any library which embedded protocol layer for modem which expose only UART interface? I believe Simcom modems are in this case.

Thanks,
Ben

Hi Ben,

Let me ask some more questions, so that I understand the use-case better. So currently you have both the Hummingboard and the mangOH red boards working side by side. You connect those through USB/USB or USB/UART and you have varying results with the CF3 cellular chips.

Are you planning to run both of those boards together when you are ready for final/production usage? I assumed you will be only using the Hummingboard. How will be the cellular chip be connected to the Hummingboard in its final configuration? I am asking since the usual approach is to either use a mPCIe card or USB dongle configuration. Or are you planning to mount somehow a CF3 socket on the Hummingboard?

Thanks,
Zahari

Hi @majorz,

The mangOH red board is only to test cellular modems. With time, cellular modem will be embedded on my custom board based on Hummingboard.

Currently I am on prototyping stage. Here are tests I realized :

  • With WP8545: USB/USB work fine.
  • With HL8515 : USB/USB don’t work.
  • With HL8515 : USB/UART I am able to do AT commands.

For my production version, at the moment I don’t know the final configuration. First I must validate communication between cellular modem and my dev board.

Thanks,
Ben

Hi Ben,

I checked the Red board documentation and I see multiple USB options. I believe you need to connect to the one on the bottom of the board - CF3 USB micro-USB connector (CN801). Also it should be best to power the Red board with adapter on the other port. You have probably already did all of this, but just noting it.

What I would suggest is to install Linux distribution (e.g. Arch linux) with a more recent kernel on a desktop or laptop machine and check it there as well. You will need to add NetworkManager and ModemManager packages as well. That will narrow down the issue and we can compare the differences and see where the issue is.

Thanks,
Zahari