Using MM without hardware for testing and development

Aleksander Morgado aleksandermj at chromium.org
Mon Sep 19 08:58:35 UTC 2022


Hey Martin!

> Dears, for development purposes and automated testing, I like to talk to
> MM like there were a modem (in my case SMS tx/rx). I wonder, if there is
> e.g. a "nomodem" or "dummy" plugin, thats external behaviour is
> controlled somehow, e.g. using sockets or dbus. TIA! Martin
>
> PS: Alternatively, dbusmock could emulate the dbus i/f of MM, but it
> seemss to have a template only for NM, not MM.

There are a couple of ways to do this, but none of them are extremely
powerful I'm afraid.

In the MM sources under /tools you can find a
"test-modemmanager-service.py" program that allows mimicking the MM
DBus interface. It allows adding fake modems in the bus and things
like that, which may be enough for some basic testing. This would
allow you to interface with a MM-like DBus interface without launching
the real MM.

Also in the MM sources under /plugins/tests you can find a test setup
that is run during the check step. This launches a full MM daemon in a
test bus, and allows mimicking a basic AT-based modem with a simple
request/response dictionary (see
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/main/plugins/tests/gsm-port.conf).

And also, in the kernel itself there is some support to simuiate
devices directly in the wwan subsystem. Haven't played myself much
with all that though.

-- 
Aleksander


More information about the ModemManager-devel mailing list