Remove obsolete file.
[connman] / test / test-supplicant
1 #!/usr/bin/python
2
3 import dbus
4 import time
5
6 WPA_NAME='fi.epitest.hostap.WPASupplicant'
7 WPA_INTF='fi.epitest.hostap.WPASupplicant'
8 WPA_PATH='/fi/epitest/hostap/WPASupplicant'
9
10 bus = dbus.SystemBus()
11
12 dummy = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH),
13                                 'org.freedesktop.DBus.Introspectable')
14
15 #print dummy.Introspect()
16
17 manager = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH), WPA_INTF)
18
19 try:
20         path = manager.getInterface("wlan0")
21 except:
22         path = manager.addInterface("wlan0")
23
24 interface = dbus.Interface(bus.get_object(WPA_NAME, path),
25                                         WPA_INTF + ".Interface")
26
27 print interface.state()
28
29 print interface.scan()
30
31 print "[ %s ]" % (path)
32
33 capabilities = interface.capabilities()
34
35 for key in capabilities.keys():
36         list = ""
37         for value in capabilities[key]:
38                 list += " " + value
39         print "    %s =%s" % (key, list)
40
41 time.sleep(2)
42
43 print interface.state()
44
45 results = interface.scanResults()
46
47 print results
48
49 path = results[0]
50
51 print "[ %s ]" % (path)
52
53 bssid = dbus.Interface(bus.get_object(WPA_NAME, path),
54                                         WPA_INTF + ".BSSID")
55
56 properties = bssid.properties()
57
58 for key in properties.keys():
59         print "    %s = %s" % (key, properties[key])