Sending variant of type bool to phosphor-dbus-monitor
Moria Zuberi
moria.zuberi at tandemg.com
Fri Dec 23 00:34:07 AEDT 2022
Hi,
I am trying to invoke a DBus method to turn on an LED *assert led group) via DBus with phosphor-dbus-monitor.
The method’s signature is (can also be done with set-property, but I don’t think phosphor-dbus-monitor supports this type of callback) :
busctl call xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/attention_on org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true
And in the .yaml file I write:
- name: atten led on
description: >
'Turn on attention LED.'
class: callback
callback: method
service: xyz.openbmc_project.LED.GroupManager
path: /xyz/openbmc_project/led/groups/attention_on
interface: org.freedesktop.DBus.Properties
method: Set
args:
- value: xyz.openbmc_project.Led.Group
type: string
- value: Asserted
type: string
- value: true
type: boolean
But then I get DBus error:
method call time=172.359041 sender=:1.49 -> destination=xyz.openbmc_project.LED.GroupManager serial=112 path=/xyz/openbmc_project/led/groups/attention_on; interface=org.freedesktop.DBus.Properties; member=Set
string "xyz.openbmc_project.Led.Group"
string "Asserted"
boolean true
error time=172.359098 sender=:1.55 -> destination=:1.49 error_name=org.freedesktop.DBus.Error.InvalidSignature reply_serial=112
string "Incorrect signature when setting property 'Asserted', expected 'v', got 'b'."
I have also tried to set ‘type’ in the .yaml to “variant” and also “variant[boolean]”, but these did not compile.
Thanks,
Moria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20221222/a81a5d2a/attachment-0001.htm>
More information about the openbmc
mailing list