# Running Modem Manager inside resin.io container

**URL:** <https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686>\
**Category:** Product support\
**Tags:** docker\
**Created:** [August 20, 2017, 11:13am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686 "2017-08-20T11:13:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![eblex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eblex/32/802_2.png) [@eblex](https://forums.balena.io/u/eblex)\
**Post date:** [August 20, 2017, 11:13am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/1 "2017-08-20T11:13:55Z")

</div>

We’re trying to use Modem Manager from within a container in order to run AT commands (future blog post!) on cellular modems  
This can be quite useful as with AT commands, we can find things like IMSI of the SIM card, signal strengh…etc…

testing out mmcli from within a container, we get the following:

```auto
# mmcli -m 0
error: couldn't get bus: Could not connect: No such file or directory

```

I’m guessing that necessary interfaces aren’t exposed in the container, would be great if this is something that could be configured or added as a resin feature

---

<div class="post-metadata">

**Author:** ![zozo123](https://avatars.discourse-cdn.com/v4/letter/z/51bf81/32.png) [@zozo123](https://forums.balena.io/u/zozo123)\
**Post date:** [August 20, 2017, 6:25pm UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/3 "2017-08-20T18:25:33Z")

</div>

Dear @eblex, I think you didn’t get my private messages. Please try to share with us the version and platform you are using information. In addition the mounted and devices lists as you see within the container.

Tomorrow we will have the whole team on board and we will be able to troubleshoot things better. Please, let us also know if we can connect to your device and see further.

Thank you for your patience.

---

<div class="post-metadata">

**Author:** ![eblex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eblex/32/802_2.png) [@eblex](https://forums.balena.io/u/eblex)\
**Post date:** [August 21, 2017, 7:26am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/4 "2017-08-21T07:26:47Z")

</div>

Hello @yossi, sure, here’s my reply from the private message:  
You can also check in with @shaunmulligan, we did the initial testing together

On ResinOS 2.2, using [resin.io](http://resin.io) dashboard / app  
In Docker file, we do:

```auto
FROM resin/%%RESIN_MACHINE_NAME%%-node:6-slim
RUN apt-get update && apt-get install -yq screen modemmanager

```

Once that’s deployed, we try to run the commands:

```auto
# mmcli -m 0
error: couldn't get bus: Could not connect: No such file or directory

```

and with AT command (to check IMSI)

```auto
# mmcli -m 0 --command=AT+CIMI
error: couldn't get bus: Could not connect: No such file or directory

```

both are failing as mmcli doesn’t seem to have access to its daemon running outside of Docker

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [August 21, 2017, 9:27am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/5 "2017-08-21T09:27:45Z")

</div>

Hey @eblex , I haven’t tested this from the container yet, but my guess is that `mmcli` can’t find the hostOS dbus socket, so one thing to try is to run `export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket` before running the `mmcli` commands.

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [August 21, 2017, 9:57am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/6 "2017-08-21T09:57:41Z")

</div>

Looks like the above works correctly, so you should be able to run AT commands. One thing that I would also recommend is that if you are running systemd in the container, then you should probably also disable and mask the ModemManager service so it doesn’t automatically run in the container and try manage the modems. you can do this using:

```auto
systemctl disable ModemManager
systemctl mask ModemManager

```

 ![04](https://global.discourse-cdn.com/balena/original/1X/faab89f831bf289d9da1e2e60c4c52b8611f1b88.png)

---

<div class="post-metadata">

**Author:** ![sqweelygig](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/sqweelygig/32/150_2.png) [@sqweelygig](https://forums.balena.io/u/sqweelygig)\
**Post date:** [August 30, 2017, 2:25pm UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/7 "2017-08-30T14:25:48Z")

</div>

@eblex did this issue get resolved, it seems to have gone quiet for a little while, so we’ll assume so, but if this is wrong just chirp up!

---

<div class="post-metadata">

**Author:** ![eblex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eblex/32/802_2.png) [@eblex](https://forums.balena.io/u/eblex)\
**Post date:** [September 3, 2017, 10:33am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/9 "2017-09-03T10:33:15Z")

</div>

Thank you for the follow-up @shaunmulligan and @Sqweelygig  
Just got around to testing this and it worked perefctly, I’ll write a more detailed blog post on this setup so that this can be used by other people.

we can close this forum topic.

---

<div class="post-metadata">

**Author:** ![eblex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eblex/32/802_2.png) [@eblex](https://forums.balena.io/u/eblex)\
**Post date:** [September 3, 2017, 11:04am UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/10 "2017-09-03T11:04:19Z")

</div>

As a note, I’ve now published a sample project on Github:

> **[alexissusset/soracom-resin-modemAT](https://github.com/alexissusset/soracom-resin-modemAT)**
>
> Example project to run AT commands on 3G/LTE modem under ResinOS - alexissusset/soracom-resin-modemAT

---

<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 9, 2017, 7:22pm UTC](https://forums.balena.io/t/running-modem-manager-inside-resin-io-container/1686/11 "2017-09-09T19:22:06Z")

</div>

Nice work!
