mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 13:44:23 +08:00
90e7850d95
Call the utility library -which uses ObjectManager API- to avoid using Manager.FindAdapter() and Manager.DefaultAdapter().
16 lines
237 B
Python
16 lines
237 B
Python
import dbus
|
|
import bluezutils
|
|
|
|
bus = dbus.SystemBus()
|
|
|
|
|
|
dummy = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.freedesktop.DBus.Introspectable')
|
|
|
|
#print dummy.Introspect()
|
|
|
|
|
|
try:
|
|
adapter = bluezutils.find_adapter()
|
|
except:
|
|
pass
|