You’re missing the property name. You need: string:Powered variant:boolean:true
ref: https://together.jolla.com/question/56437/i-would-like-to-toggle-internet-connectivity-via-terminal-with-dbus/ typedCall('SetProperty', [ {'type':'s', 'value': 'Powered'}, {'type':'v', 'value': valuet}], …); ref: https://talk.maemo.org/archive/index.php/t-92303.html -kimmo From: Devel [mailto:devel-boun...@lists.sailfishos.org] On Behalf Of Dylan Van Assche via Devel Sent: 10. kesäkuuta 2017 12:45 To: Sailfish OS Developers mailing list Subject: [SailfishDevel] Nemo DBus typedCall Hi devs, I'm playing around with the Nemo DBus QML plugin but I'm a little bit stuck when using the function typedCall(). DBusInterface { id: wifi bus: DBus.SystemBus service: 'net.connman' path: '/net/connman/technology/wifi' iface: 'net.connman.Technology' signalsEnabled: true function setState(powered) { var value = powered? 'true': 'false' typedCall('SetProperty', {'type':'s', 'value':value}, function() { console.log('[INFO] wifi power state set') }, function() { console.log('[ERROR] wifi power state failed') }) } function propertyChanged(name, value) { console.log("WiFi changed NAME=%1 VALUE=%2".arg(name).arg(value)) } } But it seems that I'm doing something wrong when I try to enable/disable wifi. It's my first attempts with DBus but I have managed to read the signals with the plugin without any issues. Cheers, Dylan
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org