Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Passing QVariant as argument to QDBusInterface->Call in bluez Set method
vegtaa last edited by
I am trying to set a property (Powered) in the bluez service but fail with this error message.
QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.UnknownMethod", error message="Method "Set" with signature "ssb" on interface "org.freedesktop.DBus.Properties" doesn't exist
", signature="", contents=() )
I should be passing a string, string, variant to the Set method. But per the error message it looks like I am sending "ssb" or string, string, bool??. This is irritating because I should be sending a QVarriant of type bool.
When I call the Get method everything works. So I believe that the QDBusInterface is good.
Here is the code snippet. my appologies for the formatting, it is hard to get the spacing right on the posting
QDBusInterface *adapter1 = new QDBusInterface("org.bluez","/org/bluez/hci0","org.freedesktop.DBus.Properties",bus);
//does not work