mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
auto-t: wpas.py: handle enrollee as responder
This adds support for wpa_supplicant to generate its own URI and start presence announcements (DPP_CHIRP).
This commit is contained in:
parent
69c1a1ba7c
commit
cfb0987eb5
@ -239,10 +239,17 @@ class Wpas:
|
|||||||
def set(self, key, value, **kwargs):
|
def set(self, key, value, **kwargs):
|
||||||
self._ctrl_request('SET ' + 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._rx_data = []
|
||||||
self._ctrl_request('DPP_BOOTSTRAP_GEN type=qrcode')
|
self._ctrl_request('DPP_BOOTSTRAP_GEN type=qrcode chan=%s' % oper_and_channel)
|
||||||
self.wait_for_result()
|
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:
|
if uri:
|
||||||
self._rx_data = []
|
self._rx_data = []
|
||||||
@ -250,6 +257,10 @@ class Wpas:
|
|||||||
self._dpp_qr_id = self.wait_for_result()
|
self._dpp_qr_id = self.wait_for_result()
|
||||||
self._rx_data = []
|
self._rx_data = []
|
||||||
self._ctrl_request('DPP_AUTH_INIT peer=%s role=enrollee' % self._dpp_qr_id)
|
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):
|
def dpp_configurator_create(self, uri):
|
||||||
self._rx_data = []
|
self._rx_data = []
|
||||||
|
Loading…
Reference in New Issue
Block a user