mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-04 01:24:42 +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
|