Using MFRC522v2 library 2.06
Start your code here
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4604
ho 0 tail 12 room 4
load:0x40078000,len:15488
load:0x40080400,len:4
load:0x40080404,len:3180
entry 0x400805b8
= (unknown)
WARNING: Communication failure, is the MFRC522 properly connected?
Scan PICC to see UID, SAK, type, and data blocks…
This line in the code throws up warning?
MFRC522Debug::PCD_DumpVersionToSerial(mfrc522, Serial);
The rest of the code works fine and reads the Tab/Card and dumps the info OK.
Start your code here
Card UID: 81 70 11 03
Card SAK: 08
PICC type: MIFARE 1KB
Sector Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AccessBits
15 63 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF [ 0 0 1 ]
62 6A 65 6E 6E 69 65 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
14 59 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF [ 0 0 1 ]
58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
~~~~~~~~~~~~~
1 7 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF [ 0 0 1 ]
6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
0 3 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF [ 0 0 1 ]
2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0 0 0 ]
0 81 70 11 03 E3 08 04 00 62 63 64 65 66 67 68 69 [ 0 0 0 ]
**********
Also I have been trying to increase the range of the MFRC522 as it’s about 1cm.
Looking on line I have found different options but none of them compile, (all with errors)
//MFRC522::PCD_GetAntennaGain();
//MFRC522::PCD_SetAntennaGain(mfrc522.PCD_RxGain_max);
// mfrc522.PCD_SetAntennaGain(mfrc522.PCD_RxGain_max);
//mfrc522.PCD_SetRegisterBitMask(mfrc522.RFCfgReg, (0x07<<4));
//mfrc522.PCD_ClearRegisterBitMask(RFCfgReg, (0x07<<4));
//mfrc522.PCD_SetRegisterBitMask(RFCfgReg, (gain<<4));mfrc522.PCD_RxGain_max;
//mfrc522.PCD_WriteRegister(0x26 , 0x7F);
Looking in the one of the libraries MFRC522v2.h there is:
void PCD_SetAntennaGain(byte mask);
and also in MFRC522Constants.h
RxGain_max = 0x07 << 4 // 111b – 48 dB, maximum, convenience for RxGain_48dB
So I don’t know what the correct procedure is.
Can anyone help?
Thank you
Hi.
The issue may be because it may take some time to initialize a communication with the module. After a bit, it should initialize properly and so you can scan the card just fine.
As for the communication range, it is normal for RFID to have a short communication range. We haven’t tried or searched a method to increase it.
is there a particular reason why you would like to increase the communication range?
Regards,
Sara
I want to use it through a wooden garage door which is 2.cm thick. it just isn’t near enough.
Great project though and I will keep moving it forward.