mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
Renamed runme.py to test_nfc.py
This commit is contained in:
parent
cabe1caa87
commit
85d15cd887
1 changed files with 0 additions and 0 deletions
14
test_nfc.py
Executable file
14
test_nfc.py
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
from brmdoor_nfc import NFCDevice, NFCError
|
||||
from binascii import hexlify
|
||||
|
||||
try:
|
||||
nfc = NFCDevice()
|
||||
print hexlify(nfc.scanUID())
|
||||
print "Device is opened:", nfc.opened()
|
||||
print "Closing device"
|
||||
nfc.close()
|
||||
print "Device is opened:", nfc.opened()
|
||||
nfc.unload()
|
||||
except NFCError, e:
|
||||
print "Reading UID failed:", e.what()
|
Loading…
Add table
Add a link
Reference in a new issue