aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-02-12 10:45:07 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-12 10:45:07 (GMT)
commit25cfc6f11ee0f3d20d69e466598651692e3dcc8f (patch)
tree932634c573d2ad5e30407fd8eeeaab233269f36f /wpa_supplicant/examples
parent7bea07645899fbb6fd27e1e9b5fca426835e4fe2 (diff)
downloadhostap-25cfc6f11ee0f3d20d69e466598651692e3dcc8f.zip
hostap-25cfc6f11ee0f3d20d69e466598651692e3dcc8f.tar.gz
hostap-25cfc6f11ee0f3d20d69e466598651692e3dcc8f.tar.bz2
P2P NFC: Add p2p-nfc.py --handover-only option
p2p-nfc.py allowed an NFC Tag to be read and reported to wpa_supplicant even in cases where it was explicitly asked to initiate negotiated connection handover and return after completing this operation. The new command line argument can be used to disable NFC Tag read operations when a negotiated connection handover is expected. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/examples')
-rwxr-xr-xwpa_supplicant/examples/p2p-nfc.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/examples/p2p-nfc.py b/wpa_supplicant/examples/p2p-nfc.py
index 03d1a27..585029b 100755
--- a/wpa_supplicant/examples/p2p-nfc.py
+++ b/wpa_supplicant/examples/p2p-nfc.py
@@ -511,6 +511,8 @@ def main():
help='do not use stdout input to initiate handover')
parser.add_argument('--tag-read-only', '-t', action='store_true',
help='tag read only (do not allow connection handover)')
+ parser.add_argument('--handover-only', action='store_true',
+ help='connection handover only (do not allow tag read)')
parser.add_argument('--freq', '-f',
help='forced frequency of operating channel in MHz')
parser.add_argument('command', choices=['write-p2p-sel'],
@@ -564,6 +566,11 @@ def main():
if args.tag_read_only:
if not clf.connect(rdwr={'on-connect': rdwr_connected}):
break
+ elif args.handover_only:
+ if not clf.connect(llcp={'on-startup': llcp_startup,
+ 'on-connect': llcp_connected},
+ terminate=terminate_loop):
+ break
else:
if not clf.connect(rdwr={'on-connect': rdwr_connected},
llcp={'on-startup': llcp_startup,