From 1e4a42c7453ac86cb6f9f011c29b1e761bf03ed2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 23 Jul 2020 11:27:27 +0300 Subject: [PATCH] dpp-nfc: Detect a non-NDEF tag when trying to write Signed-off-by: Jouni Malinen --- wpa_supplicant/examples/dpp-nfc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/examples/dpp-nfc.py b/wpa_supplicant/examples/dpp-nfc.py index a9465411e..8bf219a06 100755 --- a/wpa_supplicant/examples/dpp-nfc.py +++ b/wpa_supplicant/examples/dpp-nfc.py @@ -584,6 +584,9 @@ def dpp_tag_read(tag): def rdwr_connected_write_tag(tag): summary("Tag found - writing - " + str(tag)) + if not tag.ndef: + summary("Not a formatted NDEF tag") + return if not tag.ndef.is_writeable: summary("Not a writable tag") return