fix mifare and NTAG cohabitation
This commit is contained in:
@@ -42,6 +42,12 @@ try:
|
||||
#reader.writeNTAGPage(5,data)
|
||||
#reader.MFRC522_Dump_NTAG(uid,Start=5,End=6)
|
||||
else:
|
||||
(stat, tag_type) = reader.request(reader.REQIDL)
|
||||
if stat == reader.OK:
|
||||
(stat, uid2) = reader.SelectTagSN()
|
||||
if stat == reader.OK:
|
||||
if uid != uid2:
|
||||
continue
|
||||
defaultKey = [255,255,255,255,255,255]
|
||||
reader.MFRC522_DumpClassic1K(uid,Start=0, End=64, keyA=defaultKey)
|
||||
PreviousCard = uid
|
||||
|
||||
@@ -472,5 +472,5 @@ class MFRC522:
|
||||
self.NTAG= self.NTAG_216
|
||||
self.NTAG_MaxPage = 230
|
||||
return True
|
||||
return false
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user