Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I would like to find out what are the available objects and interfaces in the bluez dbus bus. I wrote a simple python script to list all the bus names in the dbus session.
import dbus
for service in dbus.SystemBus().list_names():
print(service)
However, I am only interested in the interfaces inside bluez /org/bluez. How can a python script be written to list down the interfaces inside /org/bluez?
I am using Ubuntu 14.04 and python 2.7
system_bus = dbus.SystemBus()
objectManager = system_bus.get_object('org.bluez', '/')
om_iface = dbus.Interface(objectManager, 'org.freedesktop.DBus.ObjectManager')
ifacelist = om_iface.GetManagedObjects()
Where ifacelist
is a Dict of {ObjectPath, Dictof{String, Variant}}}
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.