All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 08/10] auto-t: wpas.py: handle enrollee as responder
@ 2022-02-14 21:48 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2022-02-14 21:48 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.34.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-14 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 21:48 [PATCH v3 08/10] auto-t: wpas.py: handle enrollee as responder James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.