more nfc
This commit is contained in:
parent
be315e85aa
commit
5c4b97fb59
2
main.py
2
main.py
@ -105,10 +105,10 @@ class CliInteraction(UserInteraction):
|
|||||||
print("User Verification required.")
|
print("User Verification required.")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
clf = nfc.ContactlessFrontend('usb')
|
||||||
def read_nfc_tag():
|
def read_nfc_tag():
|
||||||
clf = None
|
clf = None
|
||||||
try:
|
try:
|
||||||
clf = nfc.ContactlessFrontend('usb')
|
|
||||||
tag = clf.connect(rdwr={'on-connect': lambda tag: False})
|
tag = clf.connect(rdwr={'on-connect': lambda tag: False})
|
||||||
return tag.identifier if tag else None
|
return tag.identifier if tag else None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user