summaryrefslogtreecommitdiffstats
path: root/input/test-input
blob: a5fe9605c760811b8729a52e9a90a991635f4c5e (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.CreateSecureDevice(address)