summaryrefslogtreecommitdiffstats
path: root/network/test-network
blob: f428c25f1b64f0ad5344e380e1f3dbd896efe474 (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
32
33
34
35
36
37
#!/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.FindServer('panu')),
						'org.bluez.network.Server')
except:
	pass

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