Modemmanager - Error handling.
aleksander at aleksander.es
Mon Aug 24 10:11:50 PDT 2015
On Mon, Aug 24, 2015 at 6:32 PM, Carlos Fernández
<carlos.fernandez at edosoftfactory.com> wrote:
> I have some questions about Modem Manager errors which I didn't it find in
> API reference manual and I don't know how errors are reported in Modem
There are errors defined in the MM API here:
Plus, I believe this is still true, for MBIM modems you may still get
And for QMI modems you may still get libqmi errors:
This shouldn't happen, though; ideally only ModemManager errors should
be reported through DBus to clients. I believe there was an open bug
to track that but I cannot find it anywhere now in a quick check.
> How does modemmanager/d-bus handle the errors?
> Where the errors values are returned? Is there any object/signal or value
> that is returned when a method finalizes successfully/unsuccessfully?
DBus methods have a built-in setup to return errors. So, when you call
a method 3 things may happen:
* If the method signature has return values and the operation is
successful, you'll get the return values.
* If the method signature doesn't have return values and the
operation is successful, you'll get the operation finished and no
* If the operation fails, you'll get an error reported, regardless
of the outputs defined in the method signature.
An example; check the Connect() method in the Simple interface:
The DBus method receives a 'properties' dictionary and returns a
'bearer' dictionary. In our "libmm-glib" library which maps the DBus
API we now have a mm_modem_simple_connect() method which receives a
And the corresponding finish() method will return either a MMBearer
object, *or* NULL plus the GError set:
More information about the ModemManager-devel