blob: 689e4723a697207e23d5dd2624ee5003566c29a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/python
import sys
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
'org.bluez.Manager')
conn = manager.ActivateService('input')
input = dbus.Interface(bus.get_object(conn, '/org/bluez/input'),
'org.bluez.input.Manager')
if (len(sys.argv) < 1):
print "Usage: %s <address>" % (sys.argv[0])
sys.exit(1)
address = sys.argv[1]
device = input.CreateDevice(address)
|