Skip to content

Commit

Permalink
Add print UID in Hex.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuihao committed Mar 12, 2022
1 parent 012a370 commit aa6c2c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Read.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def end_read(signal,frame):
if status == MIFAREReader.MI_OK:

# Print UID
print("Card read UID: %s,%s,%s,%s" % (uid[0], uid[1], uid[2], uid[3]))
print("Card read UID (Serial Number):\n %s,%s,%s,%s" % (uid[0], uid[1], uid[2], uid[3]))
print("Card read UID (Serial Number) in Hex.:\n %s,%s,%s,%s" % \
(hex(uid[0])[2:], hex(uid[1])[2:], hex(uid[2])[2:], hex(uid[3])[2:]))

# This is the default key for authentication
key = [0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]
Expand Down

0 comments on commit aa6c2c2

Please sign in to comment.