aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-02-11 16:43:46 (GMT)
committerJouni Malinen <j@w1.fi>2013-02-11 16:43:46 (GMT)
commite47588279af1af78ccdc88cf93df83003c01061b (patch)
treeee210e1fad1e622c379a519c7afa85dbf4d05546 /wpa_supplicant/examples
parentec01d5f6b0bec5f02960b910b78f860a6d0189ad (diff)
downloadhostap-e47588279af1af78ccdc88cf93df83003c01061b.zip
hostap-e47588279af1af78ccdc88cf93df83003c01061b.tar.gz
hostap-e47588279af1af78ccdc88cf93df83003c01061b.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant/examples')
-rwxr-xr-xwpa_supplicant/examples/wps-nfc.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wpa_supplicant/examples/wps-nfc.py b/wpa_supplicant/examples/wps-nfc.py
index c328a90..f1b29ac 100755
--- a/wpa_supplicant/examples/wps-nfc.py
+++ b/wpa_supplicant/examples/wps-nfc.py
@@ -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()