3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-24 06:52:37 +01:00

auto-t: Add additional utilities for WPS PIN support

This commit is contained in:
Denis Kenzior 2018-09-24 12:02:34 -05:00
parent 3ca1aeb917
commit 332d4f8e61
2 changed files with 10 additions and 0 deletions

View File

@ -44,6 +44,9 @@ class HostapdCLI:
def wps_push_button(self): def wps_push_button(self):
os.system(self.cmdline + ' wps_pbc') os.system(self.cmdline + ' wps_pbc')
def wps_pin(self, pin):
os.system(self.cmdline + ' wps_pin any ' + pin)
def deauthenticate(self, client_address): def deauthenticate(self, client_address):
os.system(self.cmdline + ' deauthenticate ' + client_address) os.system(self.cmdline + ' deauthenticate ' + client_address)

View File

@ -380,6 +380,13 @@ class Device(IWDDBusAbstract):
error_handler=self._failure) error_handler=self._failure)
self._wait_for_async_op() 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): def wps_cancel(self):
self._wps_manager.Cancel(dbus_interface=IWD_WSC_INTERFACE, self._wps_manager.Cancel(dbus_interface=IWD_WSC_INTERFACE,
reply_handler=self._success, reply_handler=self._success,