summaryrefslogtreecommitdiffstats
path: root/network/test-network
blob: 3719deaa9b25ce1ae67ca41f0868fdb99a76b5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python

import dbus

bus = dbus.SystemBus()

manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
							'org.bluez.Manager')

conn = manager.ActivateService('network')

network = dbus.Interface(bus.get_object(conn, '/org/bluez/network'),
						'org.bluez.network.Manager')

try:
	nap = dbus.Interface(bus.get_object(conn, network.FindServer('nap')),
						'org.bluez.network.Server')
except:
	pass

try:
	gn = dbus.Interface(bus.get_object(conn, network.FindServer('gn')),
						'org.bluez.network.Server')
except:
	pass

try:
	panu = dbus.Interface(bus.get_object(conn, network.LastConnection()),
						'org.bluez.network.Connection')
except:
	pass