Skip to content

Commit

Permalink
MFRC630: Fix decoding not returning the data, but all 0's
Browse files Browse the repository at this point in the history
Fix for https://forum.pycom.io/topic/6981/pyscan-nfc-rfid-reading-issue/

Decoding a NFC card would previously return all 0's because of this bug. Instead of returning the data, we would return the length, which would make the following function calls print all 0's instead of the decoded data.

I was not able to test this personally because of a lack of decodable keycards
  • Loading branch information
gijsio committed May 5, 2021
1 parent 01ced27 commit 148a439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shields/lib/MFRC630.py
Expand Up @@ -370,7 +370,7 @@ def mfrc630_MF_read_block(self, block_address, dest):
buffer_length = self.mfrc630_fifo_length()
rx_len = buffer_length if (buffer_length <= 16) else 16
dest = self.mfrc630_read_fifo(rx_len)
return rx_len
return dest


def mfrc630_iso14443a_WUPA_REQA(self, instruction):
Expand Down

0 comments on commit 148a439

Please sign in to comment.