From 332d4f8e61118526d13ae8fcc3178a83152cc6bf Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 24 Sep 2018 12:02:34 -0500 Subject: [PATCH] auto-t: Add additional utilities for WPS PIN support --- autotests/util/hostapd.py | 3 +++ autotests/util/iwd.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index c199863c..a87df95c 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -44,6 +44,9 @@ class HostapdCLI: def wps_push_button(self): os.system(self.cmdline + ' wps_pbc') + def wps_pin(self, pin): + os.system(self.cmdline + ' wps_pin any ' + pin) + def deauthenticate(self, client_address): os.system(self.cmdline + ' deauthenticate ' + client_address) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index d49a72c1..ee420990 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -380,6 +380,13 @@ class Device(IWDDBusAbstract): error_handler=self._failure) self._wait_for_async_op() + def wps_generate_pin(self): + return self._wps_manager.GeneratePin() + + def wps_start_pin(self, pin): + self._wps_manager.StartPin(pin, reply_handler=self._success, + error_handler=self._failure) + def wps_cancel(self): self._wps_manager.Cancel(dbus_interface=IWD_WSC_INTERFACE, reply_handler=self._success,