MM-1.14.2: mm_modem_enable() timeout due to too many SMS

Aleksander Morgado aleksander at
Sat Sep 26 08:13:49 UTC 2020

Hey Girish,

> I am on MM 1.14.2 running on a Cinterion PLS8x modem.[yocto
> distribution(thud) kernel 4.14]
> I use high level MM APIs in my code. On some SIMs the
> mm_modem_enable() (async version) times out because during the enable
> MM seems to be processing 160 odd SMS's .
> Two questions:
> 1. mm_modem_enable() times out , I am guessing because of the flood of
> SMS coming in.
>    But the modem state eventually moves to enabled. So the error is
> harmless in this case ?

Yes. The mm_modem_enable() timeout means *only* that you waited for 30s and
you didn't get a reply. If you check the modem state after that time and
eventually it moves to enabled, it means the enabling phase succeeded. But
of course, the correct way to handle this would be to avoid having the
timeout, which you can do by tweaking the default DBus timeout before
calling mm_modem_enable(), e.g. as in this case to increase it to 120s:

g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (modem), 120000);
mm_modem_enable (modem, ...);

The default of 30s is just some sane value, but it's understandable that
some operations may take longer. I believe it's the first time I see a
timeout in the enabling phase though, usually this default proxy timeout is
changed for very long async operations like the 3GPP network scan or the
actual connection attempt.

> 2. How can we suppress these SMS's ? I do see AT+CNMI , perhaps use
> these to suppress the URCs ?
My suggestion would be to read them all, and then, if they're not needed,
remove them using the Messaging interface (each SMS is exposed as a DBus
object). Also, the log shows that these are not URCs (modem indications),
the long operation reading all SMS messages is actually the output of

It is interesting, though, how long it takes to read and process each SMS
message: 10s for reading and 40s for parsing and processing all 254 PDUs.
That's a lot! I wonder if there's some part of the logic that is
considerably slower than it should be.

Anyway, if you don't want to keep all SMS messages around, it would be good
to clean them up periodically.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ModemManager-devel mailing list