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:
# 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
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.
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.
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:
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.