mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
14 lines
342 B
Python
Executable file
14 lines
342 B
Python
Executable file
#!/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()
|