# Serial Celluar Modem will not connect with ModemManager UNLIKE on Raspbian

**URL:** <https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606>\
**Category:** Product support\
**Tags:** support, raspberrypi3, resinos\
**Created:** [July 27, 2018, 5:12pm UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606 "2018-07-27T17:12:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinktank](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@thinktank](https://forums.balena.io/u/thinktank)\
**Post date:** [July 27, 2018, 5:13pm UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/1 "2018-07-27T17:13:00Z")

</div>

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](https://forums.balena.io/uploads/short-url/sfZ3eXfnkfRAea2GyMvzAWOciFM.log) (67.2 KB)

[resin-ms2372-telekom-fail.log](https://forums.balena.io/uploads/short-url/qOClLmupFzLNFNFRR9VBEOXId4k.log) (571.3 KB)

Here is the config:

```auto
[connection]
id=Telekom_M2M
type=gsm
autoconnect=true

[gsm]
number=*99#
username=t-mobile
password=tm

[ipv4]
method=auto

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

```

For any help, I am sincerely grateful!

Greetings,  
TT

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [July 28, 2018, 10:03am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/4 "2018-07-28T10:03:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thinktank](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@thinktank](https://forums.balena.io/u/thinktank)\
**Post date:** [July 29, 2018, 1:08pm UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/5 "2018-07-29T13:08:12Z")

</div>

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.

Greetings,  
Christian

---

<div class="post-metadata">

**Author:** ![thinktank](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@thinktank](https://forums.balena.io/u/thinktank)\
**Post date:** [July 30, 2018, 9:01am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/6 "2018-07-30T09:01:39Z")

</div>

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

```auto
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:

```auto
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#

```

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [July 31, 2018, 3:59am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/7 "2018-07-31T03:59:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ichus](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@Ichus](https://forums.balena.io/u/Ichus)\
**Post date:** [August 1, 2018, 10:45am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/8 "2018-08-01T10:45:53Z")

</div>

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

```auto
mmcli -L

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

```auto
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: 'Telekom.de'
           | subscription: 'unknown'
           | registration: 'home'
           | EPS UE mode: 'csps-2'
  -------------------------
  SIM | path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/0'
```

```auto
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'
```

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [August 4, 2018, 10:13am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/11 "2018-08-04T10:13:53Z")

</div>

Hi, sorry for the delay in replying.

Is this device using the OS image you downloaded from the [resin.io](http://resin.io) dashboard? If so, could you send us the dahsboard lnk to the device so we can take a look at it?

---

<div class="post-metadata">

**Author:** ![thinktank](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@thinktank](https://forums.balena.io/u/thinktank)\
**Post date:** [August 9, 2018, 8:37am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/12 "2018-08-09T08:37:20Z")

</div>

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.

Greetings,  
TT

---

<div class="post-metadata">

**Author:** ![Ichus](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@Ichus](https://forums.balena.io/u/Ichus)\
**Post date:** [August 10, 2018, 10:06am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/13 "2018-08-10T10:06:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 4, 2018, 8:17pm UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/14 "2018-09-04T20:17:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ichus](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@Ichus](https://forums.balena.io/u/Ichus)\
**Post date:** [September 5, 2018, 8:21pm UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/15 "2018-09-05T20:21:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ichus](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@Ichus](https://forums.balena.io/u/Ichus)\
**Post date:** [October 5, 2018, 10:39am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/16 "2018-10-05T10:39:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [October 5, 2018, 11:56am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/17 "2018-10-05T11:56:00Z")

</div>

Hi @Ichus on what board and what OS version?

---

<div class="post-metadata">

**Author:** ![Ichus](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@Ichus](https://forums.balena.io/u/Ichus)\
**Post date:** [October 8, 2018, 9:41am UTC](https://forums.balena.io/t/serial-celluar-modem-will-not-connect-with-modemmanager-unlike-on-raspbian/3606/18 "2018-10-08T09:41:21Z")

</div>

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