aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-01-04 14:35:38 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-04 14:35:38 (GMT)
commit58e1452474b4ad09515cb7853085a0900114bb3c (patch)
treecb44795640523266bd4ffa3952295789a23b51ea /wpa_supplicant/examples
parent777f07b62db9a00738dd77bab8a1964bea52926f (diff)
downloadhostap-58e1452474b4ad09515cb7853085a0900114bb3c.zip
hostap-58e1452474b4ad09515cb7853085a0900114bb3c.tar.gz
hostap-58e1452474b4ad09515cb7853085a0900114bb3c.tar.bz2
dbus: Remove forgotten, unused functions from GetAll script
Diffstat (limited to 'wpa_supplicant/examples')
-rwxr-xr-xwpa_supplicant/examples/wpas-dbus-new-getall.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/wpa_supplicant/examples/wpas-dbus-new-getall.py b/wpa_supplicant/examples/wpas-dbus-new-getall.py
index ea4a48a..e26d0cd 100755
--- a/wpa_supplicant/examples/wpas-dbus-new-getall.py
+++ b/wpa_supplicant/examples/wpas-dbus-new-getall.py
@@ -5,63 +5,6 @@ import sys, os
import time
import gobject
-WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1"
-WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1"
-WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1"
-
-WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface"
-WPAS_DBUS_INTERFACES_OPATH = "/fi/w1/wpa_supplicant1/Interfaces"
-WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.Interface.BSS"
-
-def showBss(bss):
- net_obj = bus.get_object(WPAS_DBUS_SERVICE, bss)
- net = dbus.Interface(net_obj, WPAS_DBUS_BSS_INTERFACE)
- props = net_obj.GetAll(WPAS_DBUS_BSS_INTERFACE,
- dbus_interface=dbus.PROPERTIES_IFACE)
- print props
- props = net_obj.Get(WPAS_DBUS_BSS_INTERFACE, 'Properties',
- dbus_interface=dbus.PROPERTIES_IFACE)
- #print props
-
- # Convert the byte-array for SSID and BSSID to printable strings
- bssid = ""
- for item in props['BSSID']:
- bssid = bssid + ":%02x" % item
- bssid = bssid[1:]
- ssid = byte_array_to_string(props["SSID"])
-
- wpa = "no"
- if props.has_key("WPAIE"):
- wpa = "yes"
- wpa2 = "no"
- if props.has_key("RSNIE"):
- wpa2 = "yes"
- freq = 0
- if props.has_key("Frequency"):
- freq = props["Frequency"]
- caps = props["Capabilities"]
- qual = props["Quality"]
- level = props["Level"]
- noise = props["Noise"]
- maxrate = props["MaxRate"] / 1000000
-
- print " %s :: ssid='%s' wpa=%s wpa2=%s quality=%d%% rate=%d freq=%d" % (bssid, ssid, wpa, wpa2, qual, maxrate, freq)
-
-def scanDone(success):
- gobject.MainLoop().quit()
- print "Scan done: success=%s" % success
-
- res = if_obj.Get(WPAS_DBUS_INTERFACES_INTERFACE, 'BSSs',
- dbus_interface=dbus.PROPERTIES_IFACE)
- props = if_obj.GetAll(WPAS_DBUS_INTERFACES_INTERFACE,
- dbus_interface=dbus.PROPERTIES_IFACE)
- print props
-
- print "Scanned wireless networks:"
- for opath in res:
- print opath
- showBss(opath)
-
def main():
bus = dbus.SystemBus()
wpas_obj = bus.get_object("fi.w1.wpa_supplicant1",