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 interface.state()
29 print interface.scan()
31 print "[ %s ]" % (path)
33 capabilities = interface.capabilities()
35 for key in capabilities.keys():
37 for value in capabilities[key]:
39 print " %s =%s" % (key, list)
43 print interface.state()
45 results = interface.scanResults()
51 print "[ %s ]" % (path)
53 bssid = dbus.Interface(bus.get_object(WPA_NAME, path),
56 properties = bssid.properties()
58 for key in properties.keys():
59 print " %s = %s" % (key, properties[key])