Trouble connecting to the Bearer interface via DBus

Aleksander Morgado aleksander at aleksander.es
Thu Feb 21 15:38:06 UTC 2019


Hey!

> I just realized I forgot to add the error and code.
> Now it should be there!
>
> Kind regards,
>
> Daniel Vlaardingerbroek
>
> Op wo 20 feb. 2019 om 15:01 schreef Daniel Vlaardingerbroek <danielvlaardingerbroek at gmail.com>:
>>
>> Hi,
>>
>> I'm trying to connect to the Bearer interface via DBus, but it's giving me an error that the interface does not exist. I added my code and error below. Before I try and sort this out in the source code of ModemManager itself, has anyone experienced this before / what am I doing wrong here?
>>
>> I already tried /Bearers/, but that didn't work either.
>>

Just wondering, why don't you use the gobject-introspection based
libmm-glib support to interface with MM in python? It's extremely
simpler to use it
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/tree/master/examples/modem-watcher-python

Also, you shouldn't blindly try to point to specific Bearer objects in
DBus. The way to do it is to use the specific bearer paths given by a
specific modem object in Bearers property.
i.e.:
 * List modems
 * Select modem object to use
 * Read Bearers property from the Modem interface (a list of bearer paths)
 * Select bearer object from the given list of paths

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list