Serial Celluar Modem will not connect with ModemManager UNLIKE on Raspbian

Hi everyone!

I want to use a serial Modem like Huawei E303
or Huawei MS2372 for my project.
And I want to use SIM cards from a special M2M provider.

Now I already got the setup working on a normal RaspberryPi with Raspbian Stretch and NetworkManager and ModemManager installed.

When I try the exact same hardware and exact same configuration files with NetworkManager and ModemManager on ResinOS, the ModemManager goes into a loop and never finishes the connection.

I think part of the reason might be that my (working) configuration file in /etc/NetworkManager/system-connections/my-m2m-conf specifies an EMTPY apn field. This is accepted and used successfully by the ModemManager on Stretch and is not used for some reason by the ModemManager on resinOS (it just tries a default APN instead - without success, as you can see in the logs).
Does Resin have special requirements for the config files that other systems do not?

Attached, you will find a log of ModemManager --debug on both systems.

stretch-ms2372-telekom-success.log (67.2 KB)

resin-ms2372-telekom-fail.log (571.3 KB)

Here is the config:





For any help, I am sincerely grateful!


What carrier is this? Can you give some more details about these SIM cards?

1 Like

Hi Floion,
thanks for your quick reply.

They are regular M2M SIM cards from the German carrier Telekom.
The configuration from my post worked with ModemManager on Raspbian and on Ubuntu 16.10 out of the box.


When ModemManager simple connect starts on resin, it takes a default APN, as you can see here:

ModemManager[29006]: <info>  [1532711122.395785] Simple connect started...
ModemManager[29006]: <debug> [1532711122.396113]    PIN: unspecified
ModemManager[29006]: <debug> [1532711122.396263]    Operator ID: unspecified
ModemManager[29006]: <debug> [1532711122.396385]    Allowed roaming: yes
ModemManager[29006]: <debug> [1532711122.396505]    APN: internet.t-mobile
ModemManager[29006]: <debug> [1532711122.396626]    IP family: ipv4
ModemManager[29006]: <debug> [1532711122.396747]    Allowed authentication: unspecified
ModemManager[29006]: <debug> [1532711122.396874]    User: t-mobile
ModemManager[29006]: <debug> [1532711122.396991]    Password: tm
ModemManager[29006]: <debug> [1532711122.397112]    Number: *99#

On Raspbian, the same stage of the connection looks like this:

Jul 27 13:56:19 raspberrypi ModemManager[16239]: <info>  Simple connect started...
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    PIN: unspecified
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    Operator ID: unspecified
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    Allowed roaming: yes
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    APN:
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    IP family: ipv4
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    Allowed authentication: unspecified
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    User: t-mobile
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    Password: tm
Jul 27 13:56:19 raspberrypi ModemManager[16239]: <debug>    Number: *99#

resin is not tweaking ModemManager with regards to config file syntax. So no changes to the APN setting.
Can you try to run some commands and logs?

mmcli -b <bearer number>

where the bearer number is seen in the last line of output of

mmcli -m <modem number>

and you get the modem number from

mmcli -L

for start

1 Like

Hello floion,
I am working with thinktank on this problem, and here are the logs you requested:

mmcli -L

Found 1 modems:
        /org/freedesktop/ModemManager1/Modem/0 [huawei] MS2372h-153
mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id '64ae587dadc43e0966a2d3079bbdc6e5fb49125b')
  Hardware |   manufacturer: 'huawei'
           |          model: 'MS2372h-153'
           |       revision: '21.327.07.00.00'
           |   H/W revision: 'unknown'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: '866129030028963'
  System   |         device: '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5'
           |        drivers: 'huawei_cdc_ncm, option1'
           |         plugin: 'Huawei'
           |   primary port: 'ttyUSB2'
           |          ports: 'ttyUSB0 (at), ttyUSB2 (at), wwan0 (net)'
  Numbers  |           own : 'unknown'
  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
           |          state: 'disconnecting'
           |    power state: 'on'
           |    access tech: 'lte'
           | signal quality: '80' (recent)
  Modes    |      supported: 'allowed: 2g; preferred: none
           |                  allowed: 3g; preferred: none
           |                  allowed: 4g; preferred: none
           |                  allowed: 2g, 3g, 4g; preferred: none'
           |        current: 'allowed: 2g, 3g, 4g; preferred: none'
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  IP       |      supported: 'ipv4'
  3GPP     |           imei: '866129030028963'
           |  enabled locks: 'none'
           |    operator id: '26201'
           |  operator name: ''
           |   subscription: 'unknown'
           |   registration: 'home'
           |    EPS UE mode: 'csps-2'
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'
mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  Status             |   connected: 'no'
                     |   suspended: 'no'
                     |   interface: 'unknown'
                     |  IP timeout: '20'
  Properties         |         apn: 'internet.t-mobile'
                     |     roaming: 'allowed'
                     |     IP type: 'ipv4'
                     |        user: 't-mobile'
                     |    password: 'tm'
                     |      number: '*99#'
                     | Rm protocol: 'unknown'
  IPv4 configuration |   method: 'unknown'
  IPv6 configuration |   method: 'unknown'
  Stats              |          Duration: '0'
                     |    Bytes received: 'N/A'
                     | Bytes transmitted: 'N/A'

Hi, sorry for the delay in replying.

Is this device using the OS image you downloaded from the dashboard? If so, could you send us the dahsboard lnk to the device so we can take a look at it?

Hi Floion,
Ichus got it to work.
Thanks for your help!

We are not exactly sure yet, why it works now.
We will give you another update soon.


Hi Floion,
The problem seems to be unique to the specific installation on the RaspberryPi, since the problem was not reproducible with 6 different installations.
If you are still interested to look for the problem with the support help, i’ll notify you via PM as soon as we have the system running for you to work at.

1 Like

Hi @thinktank @Ichus have you found out what was wrong with it in the end?

Hi floion, the error is not reproducible and the errored system had to be replaced. If the Error will come up again, I’ll be sure to notify you

Hi @floion,
I was finally able to reproduce the error. The ModemManager is unable to connect, due to not releasing the device lock on Port tty/USB2
Even after disconnection the device, the Port is still on lockdown
Closing the ModemManager also leaves the device lock unhandled.

Hi @Ichus on what board and what OS version?

Resin OS 2.13.6+rev1
on a RaspberryPi Type 3 with SleepyPi