last day (28 days later) » 

2:47 PM
0
Q: Trying to code a RFID tag to a MFRC522 chip using raspberry pi but it is not allowing me to read it

627117717.prTrying to read my RFID MFRC522 using a Mifare blue tag and it is not working. Wondering if i could get any help on this as when i put the tag to read it doesn't show up as quick? using: https://pimylifeup.com/raspberry-pi-rfid-rc522/ https://medium.com/coinmonks/for-beginners-how-to-set-up-a-r...

 
I tried libnfc1.1.7 the other day and found it OK. I followed the instructions, setup in 15 minutes, and read a tag successfully. (1) "Problem with detecting badge with PN532 and Raspberry Pi“: stackoverflow.com/questions/60819793/… Perhaps you can try libnfc and let me know if you have any problems. I might also try the PiMyLifeUp and compared with your installation record.
By the way, you gave two tutorial references. The first one is OK. I think I would try that later. But the second tutorial seems a bit out of date, because it uses python 2.7. I worry that the drivers might not be compatible to your hardware/software configuration. Can you let us know your Rpi and OS version?
 
Hi mate my RPI is 3 and the os is rasbpian noobs using linux
Still not working unfortunately not sure why it is not working in the first place when i have followed each step and the modules all turn on and work!
 
I didn't catch you. Did you mean that an hour ago when you asked your question, you had no luck. Both tutorials didn't work. But in this hour you tried your luck again and every step now work smoothly, and so NOW YOU CAN READ the tag? Can you please confirm which one of the two tutorials works, or both work. It would be nice if you can very briefly answer your question here, so that other newbies would be grateful to know how to setup the RFID reader? If every step work, but still cannot read the tag, I can repeat your steps and see why you still cannot read the tag. Cheers.
 
SO did each step by step the link you said i should try still NO LUCK still can not read or write the tags
 
Thank you for your clarification. So perhaps I can try your first tutorial. If no luck, then I can try the second tutorial. Wish me luck. Cheers.
 
2:47 PM
Ok that sounds good if your ok with that and if the tutorials work for you then must be something software or maybe hardware that is going wrong on my side!
 
Well, I just finished reading the tutorial by Gus of PiMyLifeup, also skimmed the 70+ comments. I understand 90% what is going on, except the SPI library which seems not exactly the same library I am using. This might be one thing I might get stuck. Anyway, I am now starting to follow the tutorial, not step by step, but skipping steps and using not exactly the same tools. Eg, I will use Rpi4B buster Thonny IDE to edit and run the programs. (One reader commented using IDLE python 3, but IDLE is not longer available), / to continue, ...
 
Thats fine i was using the Terminal to do everything in and the code coming from the pi up my life website just to see if it worked or not and as of yet still not working
 
No problem. I can also use CLI bash, pip, nano etc for the preliminary setsup, and perhaps more GUI later. I am getting started with the PN532 module which I tested OK with I2C some time ago. Now I am switching from LibNfc library to PyMyLifeUp library.
Yesterday evening I already used "pip3" to install "mfrc522". As I said earlier, I don't know nothing about SPI-Py, so I did not use the newbie scary "git-clone" and "python setup" to install the SPI-Py module. I noticed that what you built is a python 2.7 SPI-Py module. But I started learning python already with Rpi IDLE python 3.5.3. So I am not going back to the old python 2.7. Just now I checked out that pip3 seems happy with pip3 installed GPIO, SpiDev, and mfrc522 requirements. So I am hopping that I don't need SPI-Py and go straight to python programming.
 
HI have you had anymore luck in trying to use the mfrc522 module to see if it reads any tags by any chance as thats the one im more focussed on?
if the same outcome for the mfrc522 can be achieved like testing the tag pn532 nfc module that would be great as i still can get anything to read what so ever!
 
No luck! Now I am googling to debug. I need to make sure a couple of things, including: (1) Must I use python 2? (2) Must I use SPI-Py and not buster preinstalled SPI? You might like to check out the following discussion: raspberrypi.org/forums/viewtopic.php?t=207328#p1282986. Ah, supper time, see you tomorrow.
I just found out that I have forgotten to make the reset pin connection. So my module is not reset to start working. There might be other careless mistakes.
I also found out that there are at least two mfrc522 gitHub library. Perhaps I ppip install the wrong library: github.com/mxgxw/MFRC522-python. Of there are other reasons, say the library is only for Rpi 2, 3, not for Rpi4 buster. I also check the source code that SPI speed is set to 10MHz, which is too high for my long wiring. I need to set SPI speed lower, perhaps 400kHz. In short, too many possible bugs. libnfc 1.1.7 is very smooth, it took me only less than 30 minutes. Perhaps I tried the SPI librnfc version to verify that SPI speed can be set to 10MHz.
I also read that PN532 old versions 1.x are not reliable. So everybody is using V3. Are you on V3?
The following also says must lower SPI frequency from 5MHz to 50kHz. That means PN532 cannot do high frequency: wiki.sunfounder.cc/….
Now I am thinking of going back to libnfc and test the spi version, to make sure both libnfc v1.1.7 I2C and SPI version are OK, then I will come back to do PyMyLifeUp SPI version. I am also configuring minimal number of SPI, I2C, and UART channels/ports.
 
2:47 PM
Sounds good the libnfc version is looking good so far hopefully the same will work for the mfrc522 chip and tags
 

  last day (28 days later) »