WPS: Report NFC connection handover completion differently
Instead of reporting only one connection handover message, report completion of NFC connection handover with carrier record from both the request and select messages. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
ec01d5f6b0
commit
e47588279a
7 changed files with 131 additions and 7 deletions
|
@ -61,11 +61,13 @@ def wpas_get_handover_req():
|
|||
return wpas.request("NFC_GET_HANDOVER_REQ NDEF WPS-CR").rstrip().decode("hex")
|
||||
|
||||
|
||||
def wpas_put_handover_sel(message):
|
||||
def wpas_report_handover(req, sel):
|
||||
wpas = wpas_connect()
|
||||
if (wpas == None):
|
||||
return
|
||||
print wpas.request("NFC_RX_HANDOVER_SEL " + str(message).encode("hex"))
|
||||
return None
|
||||
return wpas.request("NFC_REPORT_HANDOVER INIT WPS " +
|
||||
str(req).encode("hex") + " " +
|
||||
str(sel).encode("hex"))
|
||||
|
||||
|
||||
def wps_handover_init(peer):
|
||||
|
@ -131,7 +133,7 @@ def wps_handover_init(peer):
|
|||
print "Remote carrier type: " + carrier.type
|
||||
if carrier.type == "application/vnd.wfa.wsc":
|
||||
print "WPS carrier type match - send to wpa_supplicant"
|
||||
wpas_put_handover_sel(carrier.record)
|
||||
wpas_report_handover(data, carrier.record)
|
||||
wifi = nfc.ndef.WifiConfigRecord(carrier.record)
|
||||
print wifi.pretty()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue