Closed Gianmariai closed 3 years ago
THANK you so much David.
Gianmaria
I'm still doing something wrong...
DBusConnection connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SYSTEM);
org.freedesktop.dbus.interfaces.Properties properties = connection.getRemoteObject("org.freedesktop.ModemManager1", "/org/freedesktop/ModemManager1/Modem/Modem3gpp", org.freedesktop.dbus.interfaces.Properties.class);
IMEI = properties.Get("org.freedesktop.ModemManager1.Modem.Modem3gpp", "Imei");
connection.disconnect();
gives me error at runtime: No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/ModemManager1/Modem/Modem3gpp
I'm still missing something..
gianmaria
I don't know what you are trying to do. Please use d-feet or similar to investigate the exported DBus objects and to find to correct object path and busname.
On my machine I have a /org/freedesktop/ModemManager1
object path and a org.freedesktop.ModemManager1
object on the bus. I don't see any /org/freedesktop/ModemManager1/Modem/Modem3gpp
path using d-feet.
unfortunatly I dont have d-feet on target machine, it's a small embedded device without display and any X interface. Will update this thread with solution once i finish to investigate, maybe it can be useful to someonee else.
Regards David. Gianmaria
Hello, sorry, it's not clear to me how can i read Properties using dbus-java and how to subscribe for their value changed.. for example I'm working on ModemMAnager, that exposes a lot of properties here: https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/gdbus-org.freedesktop.ModemManager1.Modem.html But I cant understand how to read it.
Sorry for question. Thanks Gianmaria Italy