I don't know if I got the syntax wrong, the methods are working perfectly fine and are also returning the right values, but I can't retrieve any signal even if I can see them with dbus-monitor --system --profile.
def myFunc(item, price):
print(item)
print(price)
loop.quit()
from pydbus import SystemBus
from gi.repository import GLib
bus = SystemBus()
# Create an object that will proxy for a particular remote object.
dev = bus.get(
"org.testing.Sbc", # Bus name
"/Sbc" # Object path
)
devapi = dev['org.Testing.Dbus.SBCInterface']
result = devapi.StartSession(0, 0,"Session started by Python script") #Works well
print(result)
devapi.Addcredit(5000) #Works well
devapi.SelectionEcho.connect(myFunc) #Doesn't do anything, also tried all below without result
# devapi.SelectionEcho.connect(print)
# devapi.onSelectionEcho= myFunc
# devapi.onSelectionEcho= print
loop = GLib.MainLoop()
loop.run()
I don't know if I got the syntax wrong, the methods are working perfectly fine and are also returning the right values, but I can't retrieve any signal even if I can see them with
dbus-monitor --system --profile
.Did I miss something?
Part of the xml that is relevant:
Part of my code: