RFID Tag gives one ID on RFID-RC522 Reader and another ID on a portable Reader

28 Views Asked by At

I'm searching all-over the internet to find some information about this mistake. Already looked for similar issue here on Stack Overflow but the topics I found doesn't solve the problem.

I have a RC522 RFID Module connected to a Raspberry PI4.

As I scan the Tag it prints: 397829713198 as the ID When I try to scan the same TAG on a portable reader device I obtain 2910822492 I try to convert it to Hexadecimal, try to make permutations, invertions, either in Binary but nothing works.

Do somebody have any idea on how to obtain the raspberry ID from the Portable Reader ID?

This is my Python code, thanks:

import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
import time
import multiprocessing

GPIO.setwarnings(False)

reader = SimpleMFRC522()
max_runtime = 10  # Tempo massimo di esecuzione in secondi

def read_rfid():
    try:
        id, text = reader.read()

        print(id)
        
    except KeyboardInterrupt:
        pass

def main():
    start_time = time.time()

    rfid_process = multiprocessing.Process(target=read_rfid)
    rfid_process.start()

    while rfid_process.is_alive():
        current_time = time.time()
        elapsed_time = current_time - start_time

        if elapsed_time >= max_runtime:
            rfid_process.terminate()
            rfid_process.join()
            break

if __name__ == "__main__":
    try:
        main()
    finally:
        GPIO.cleanup()
0

There are 0 best solutions below