From: Randell J. <rj...@wg...> - 2009-10-06 03:08:57
|
>I'm developing the dbus-c++, but I think my problem is dbus specific. >So I ask here. > >This is what I do on the terminal: > >> dbus-send --system --type=method_call --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter > >method return sender=:1.43 -> dest=:1.81 reply_serial=2 > object path "/org/bluez/11832/hci0" > >This works well. So I tried the python code: > >bus = dbus.SystemBus() > >bluez = dbus.Interface(bus.get_object("org.bluez", "/"), > "org.bluez.Manager") > >print "DefaultAdapter: " + bluez.DefaultAdapter () > >This prints: > >DefaultAdapter: /org/bluez/11832/hci0 > >Also working, so I tested it with dbus-c++ and I get this error: > >> ./bluephone >terminate called after throwing an instance of 'DBus::Error' > what(): Connection ":1.83" is not allowed to own the service "org.bluez" due > to security policies in the configuration file You didn't give the code used with dbus-c++ - the error implies (end the rest of what you wrote) it's NOT (just) calling or.bluez.Manager.DefaultAdapter. The error implies bluephone tried to register the name org.bluez, which your dbus-send and python tests didn't do. -- Randell Jesup, Worldgate (developers of the Ojo videophone) rj...@wg... |