I need to send a message to a method with signature (bbb). Monitoring the system calls, I see that the datatype sent to this method is variant:struct.
I am able to send simple, not nested, data types with
DBUS_SEND = ["dbus-send", "--system", "--dest=com.destination",
"--type=method_call", "--print-reply", "/com/destination",
"org.freedesktop.DBus.Properties.Set", "string:\"com.destination\"",
"string:\"color\"", "variant:string:\"black\""]
dbus_send_command = ' '.join(n for n in DBUS_SEND)
subprocess.call(['ssh', '-tt', 'user@machine', dbus_send_command])
The problem is thatdbus-send does not support neither nested containers, nor struct, and gdbus is not available on the remote.
Would it be possible to use pydbus or any other alternatives to send messages with nested containers to a remote machine?
There is a
busctlinstalled on the machine, so we can send this type of message