* [PATCH 10/12] auto-t: wpas.py: handle enrollee as responder
@ 2022-01-18 21:25 James Prestwood
0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2022-01-18 21:25 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]
This adds support for wpa_supplicant to generate its own URI and
start presence announcements (DPP_CHIRP).
---
autotests/util/wpas.py | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/autotests/util/wpas.py b/autotests/util/wpas.py
index c8e65179..995bdad1 100644
--- a/autotests/util/wpas.py
+++ b/autotests/util/wpas.py
@@ -239,10 +239,17 @@ class Wpas:
def set(self, key, value, **kwargs):
self._ctrl_request('SET ' + key + ' ' + value, **kwargs)
- def dpp_enrollee_start(self, uri=None):
+ def dpp_enrollee_start(self, uri=None, oper_and_channel=None):
+ if not oper_and_channel:
+ oper_and_channel = '81/1'
+
self._rx_data = []
- self._ctrl_request('DPP_BOOTSTRAP_GEN type=qrcode')
- self.wait_for_result()
+ self._ctrl_request('DPP_BOOTSTRAP_GEN type=qrcode chan=%s' % oper_and_channel)
+ self._dpp_qr_id = self.wait_for_result()
+ self._ctrl_request('DPP_BOOTSTRAP_GET_URI %s' % self._dpp_qr_id)
+ self._dpp_uri = self.wait_for_result()
+
+ print("DPP Enrollee QR: %s" % self._dpp_uri)
if uri:
self._rx_data = []
@@ -250,6 +257,10 @@ class Wpas:
self._dpp_qr_id = self.wait_for_result()
self._rx_data = []
self._ctrl_request('DPP_AUTH_INIT peer=%s role=enrollee' % self._dpp_qr_id)
+ else:
+ self._ctrl_request('DPP_CHIRP own=%s iter=100' % self._dpp_qr_id)
+
+ return self._dpp_uri
def dpp_configurator_create(self, uri):
self._rx_data = []
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-18 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18 21:25 [PATCH 10/12] auto-t: wpas.py: handle enrollee as responder James Prestwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox