6 WPA_NAME='fi.epitest.hostap.WPASupplicant'
7 WPA_INTF='fi.epitest.hostap.WPASupplicant'
8 WPA_PATH='/fi/epitest/hostap/WPASupplicant'
10 bus = dbus.SystemBus()
12 dummy = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH),
13 'org.freedesktop.DBus.Introspectable')
15 #print dummy.Introspect()
17 manager = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH), WPA_INTF)
20 path = manager.getInterface("wlan0")
22 path = manager.addInterface("wlan0")
24 interface = dbus.Interface(bus.get_object(WPA_NAME, path),
25 WPA_INTF + ".Interface")
27 print "state = %s" % (interface.state())
30 print "scanning = %s" % (interface.scanning())
34 print "[ %s ]" % (path)
36 capabilities = interface.capabilities()
38 for key in capabilities.keys():
40 for value in capabilities[key]:
42 print " %s =%s" % (key, list)
49 print "scanning = %s" % (interface.scanning())
55 print "state = %s" % (interface.state())
57 results = interface.scanResults()
63 print "[ %s ]" % (path)
65 bssid = dbus.Interface(bus.get_object(WPA_NAME, path),
68 properties = bssid.properties()
70 for key in properties.keys():
71 print " %s = %s" % (key, properties[key])