From c7466cd56a82e405ef9c3be32d81a53a624fded2 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 12 Aug 2021 16:12:29 -0700 Subject: [PATCH] auto-t: add python API for StationDebug.Scan --- autotests/util/iwd.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index f5c224b8..7bb4c9f0 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -242,6 +242,10 @@ class StationDebug(IWDDBusAbstract): def autoconnect(self): return self._properties['AutoConnect'] + def scan(self, frequencies): + frequencies = dbus.Array([dbus.UInt16(f) for f in frequencies]) + self._iface.Scan(frequencies) + class Device(IWDDBusAbstract): ''' Class represents a network device object: net.connman.iwd.Device @@ -585,6 +589,12 @@ class Device(IWDDBusAbstract): IWD_STATION_DEBUG_INTERFACE) self._station_debug_if.Roam(dbus.ByteArray.fromhex(address.replace(':', ''))) + def debug_scan(self, frequencies): + if not self._station_debug: + self._station_debug = StationDebug(self._object_path) + + self._station_debug.scan(frequencies) + def __str__(self, prefix = ''): return prefix + 'Device: ' + self.device_path + '\n'\ + prefix + '\tName:\t\t' + self.name + '\n'\