Closed eagleflysky closed 4 years ago
As far as I know, this is a hardware limitation by the mfrc522, as mentioned in the readme. The pn532 work because it has more abilities.
You can cross check with a raspberry + python mfrc522 library. If mfrc522+raspberry+emulated card work, then we have a software problem in this library.
Best.
Hi, @Rotzbua I've tried on Raspi with MFRC522 lib(https://github.com/mxgxw/MFRC522-python.git), and the emulated card can be read out:
pi@raspberrypi:~/MFRC522-python $ python3 Read.py Welcome to the MFRC522 data read example Press Ctrl-C to stop. Card detected Card read UID: 51,32,211,4 Size: 8 Sector 8 [3, 17, 17, 20, 255, 255, 255, 25, 18, 18, 0, 0, 255, 255, 3, 16]
The init config is different in python:
Can you replace setting in MFRC522.cpp
:
With:
PCD_WriteRegister(TModeReg, 0x8D);
PCD_WriteRegister(TPrescalerReg, 0x3E);
PCD_WriteRegister(TReloadRegH, 0);
PCD_WriteRegister(TReloadRegL, 30);
Maybe this helps..
I did the math for the init parameters, it turns out the python library set the reload timer as 24ms before time out. It's not a big difference.
Anyway , I've tested with modified init, still failed to read the emulated card
I did 2 more tests:
WebREPL connected
>>> import os
>>> os.listdir()
['boot.py', 'webrepl_cfg.py', 'MFRC522.py', 'reading.py']
>>> import reading
>>> reading.reading()
Card detected - 16
Card read UID: 51,32,211,4
Size: 8
Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@Rotzbua Cellphone emulated card can be read after I updated this lib to latest version: )
I'm using your lib to read Mifare Card with ESP8266. It works very well. However it cannot read emulated NFC card on my cellphone . I repace RC522 module with PN532 module and use Adafruit_PN532 lib, the emulated NFC card can be read out. I used another cellphone with Taginfo to read the emulated NFC card, it shows below info:
Will this lib support emulated NFC card later? Thanks