From 77d5b57e9e3c22d8815189b4d9702f1f88803fe2 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 12 Aug 2021 13:21:56 -0700 Subject: [PATCH] auto-t: iwd.py: add roam() method This will use the Roam() developer method to force a roam to a certain BSS. This is particularly useful for any test requiring roams that are not testing IWD's BSS selection logic. Rather than creating hwsim rules, setting low RSSI values, and waiting for the roam logic/scan to happen Roam() can be used to force the roam logic immediately. --- autotests/util/iwd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index be072a42..1785081f 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -542,6 +542,12 @@ class Device(IWDDBusAbstract): IWD_STATION_DEBUG_INTERFACE) self._station_debug_if.ConnectBssid(dbus.ByteArray.fromhex(address.replace(':', ''))) + def roam(self, address): + self._station_debug_if = dbus.Interface(self._bus.get_object(IWD_SERVICE, + self.device_path), + IWD_STATION_DEBUG_INTERFACE) + self._station_debug_if.Roam(dbus.ByteArray.fromhex(address.replace(':', ''))) + def __str__(self, prefix = ''): return prefix + 'Device: ' + self.device_path + '\n'\ + prefix + '\tName:\t\t' + self.name + '\n'\