abobija/esp-idf-rc522

Different Serials

amoopoori opened this issue · 1 comments

Hello, I read an RFID card using this library and received the value 1007534008355, which in hexadecimal is EA 95B4 E823. However, when I read the same card with the Arduino library, it provides the following value: 95 B4 E8 23. How can I convert these values to each other?

For anyone else reading this: it's likely a bug in the library in rc522_sn_to_u64; the original code tries to parse 5 bytes out of a 4-byte serial number. From what I can tell,
for(int i = 4; i >= 0; i--) {
should be changed to
for(int i = 3; i >= 0; i--) {