eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 64398f3143a52965fb5905eb85695a17f56f417d
parent 175fd00c6bb3c63e2fcbee8f6876750a988ccefd
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Sat, 22 Sep 2018 18:48:28 +0200

test: Update the list-devices script

Diffstat:
Mtest/list-devices | 43++++++++++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 17 deletions(-)

diff --git a/test/list-devices b/test/list-devices @@ -31,6 +31,8 @@ for path, phy in tree.children.items(): for key in properties: val = properties[key] + if key == 'SupportedModes': + val = [str(mode) for mode in val] print(" %s = %s" % (key, val)) print(" Devices:") @@ -39,21 +41,28 @@ for path, phy in tree.children.items(): if 'net.connman.iwd.Device' not in device.interfaces: continue - properties = device.interfaces['net.connman.iwd.Device'] - device = dbus.Interface(bus.get_object("net.connman.iwd", path2), - 'net.connman.iwd.Device') - print(" [ %s ]" % path2) - - for key in properties: - val = properties[key] - print(" %s = %s" % (key, val)) - - print(" Sorted networks:") - - for path3, ssid, rssi, security in device.GetOrderedNetworks(): - print(" [ %s ]" % path3) - - print(" SSID = %s" % (ssid,)) - print(" Signal strength = %i dBm" % (rssi / 100,)) - print(" Security = %s" % (security,)) + for interface in device.interfaces: + name = interface.rsplit('.', 1)[-1] + if name not in ('Device', 'Station', 'AccessPoint', 'AdHoc'): + continue + + properties = device.interfaces[interface] + for key in properties: + val = properties[key] + print(" %s.%s = %s" % (name, key, val)) + + if name != 'Station': + continue + + print(" Sorted networks:") + + station = dbus.Interface(bus.get_object("net.connman.iwd", path2), + 'net.connman.iwd.Station') + for path3, rssi in station.GetOrderedNetworks(): + print(" [ %s ]" % path3) + + properties2 = objects[path3]['net.connman.iwd.Network'] + print(" SSID = %s" % (properties2['Name'],)) + print(" Signal strength = %i dBm" % (rssi / 100,)) + print(" Security = %s" % (properties2['Type'],))