Skip to content

Commit 25adc91

Browse files
committed
Fixes an issue reading 7bit UID values
1 parent f7e2857 commit 25adc91

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

lib/MFRC630/MFRC630.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def mfrc630_iso14443a_select(self, uid):
702702
uid[(cascade_level - 1) * 3 + UIDn] = uid_this_level[UIDn];
703703

704704
# Finally, return the length of the UID that's now at the uid "pointer".
705-
return cascade_level * 3 + 1;
705+
return cascade_level * 3 + 1
706706

707707
self.print_debug("Exit cascade loop nr. %d: " % cascade_level)
708708
self.mfrc630_print_block(uid, 10)

pyscan/lib/MFRC630.mpy

0 Bytes
Binary file not shown.

pyscan/lib/MFRC630.mpy-1.18

0 Bytes
Binary file not shown.

pyscan/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Simple Pyscan NFC / MiFare Classic Example
3-
Copyright (c) 2019, Pycom Limited.
3+
Copyright (c) 2020, Pycom Limited.
44
55
This example runs the NFC discovery loop in a thread.
66
If a card is detected it will read the UID and compare it to VALID_CARDS
@@ -20,7 +20,8 @@
2020
import _thread
2121

2222
VALID_CARDS = [[0x43, 0x95, 0xDD, 0xF8],
23-
[0x43, 0x95, 0xDD, 0xF9]]
23+
[0x43, 0x95, 0xDD, 0xF9],
24+
[0x46, 0x5A, 0xEB, 0x7D, 0x8A, 0x08, 0x04]]
2425

2526
py = Pyscan()
2627
nfc = MFRC630(py)

0 commit comments

Comments
 (0)