How can I create modem object when in "failed" state?

Aleksander Morgado aleksander at aleksander.es
Sun Nov 17 14:28:19 UTC 2019


Hey,

> I want to create a modem object (org.freedesktop.ModemManager1.Modem), but when it has no sim, an exception "[org.freedesktop.ModemManager1.Error.Core.WrongState] modem in failed state" is thrown.
> The thing is, I want to reset the modem, and for this I do need to have the modem object.
>
> How can I create a modem object although it's in "failed" state? Or, on the other hand, how can I reset a modem which hasn't been created yet, without using any shell command?
>

A modem object with the Modem interface available is always exposed in
DBus when in Failed state. There is (should be) nothing that prevents
that from happening.
I assume you're not using libmm-glib, so please share the code you're
trying to run, otherwise it's impossible to help :D

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list