I'm trying to connect an RC522 RFID reader to the a Raspi via its SPI port. Up till now, I have tried several different pieces of code that are supposedly working, however, I have had no success with them.

The first one is a python script taken from here. Running Read.py outputs nothing. I dont see any Card detected as expected. On printing the status code, I see a 2, which, I think, means a MIFARE connection error.

The second promising code that was tried was taken from here. This one unfortunately outputs a 'Collission' as the output. I'm not sure whats wrong.

I'm fairly certain that the sequence of connection is fine, as several different sources/blog posts/tutorials seem to agree on that. In any case, these are the connections I've got:

enter image description here enter image description here enter image description here

Not having a lot of hardware experience, it's a bit hard for me to pin-point the exact location of where the problem may be occurring. At this point I am considering purchasing a USB RFID-reader instead. But in any case, I would love to know whats wrong here, and if there is something obviously wrong here. If you have any other sample code to interface with an RFID reader, and one that's tested to be working, then do post.

  • "RC522 RFID reader to the a Raspi via its serial ports" RC522 uses SPI (Serial Peripheral Interface). When people mention serial they always think of RS232 or the UART. In this case SPI != RS232/UART. How did you connect the chip select, clock, MOSI and MISO of the RFID board to the RPI? Commented Oct 16, 2014 at 3:59
  • Sorry I meant SPI, as also indicated in the images. You can see how new I am to this.
    – Urban
    Commented Oct 16, 2014 at 7:15
  • 1
    So how did you connect the chip select, clock, MOSI and MISO of the RFID board to the RPI? You need to verify if the pins are wired properly. Maybe this will help a bit learn.sparkfun.com/tutorials/serial-peripheral-interface-spi Think of the RPI as the Master and the RFID as the Slave. Commented Oct 16, 2014 at 7:31
  • 1
    Hi @Urban, I read the page and I think everything is OK. I did notice that the RPI on the page is an old version (Model A or B, because of the yellow RCA jack). Your RPI is a Model B+. Is it correct? The pinout is different for the Model A/B and Model B+. Find the correct layout here: raspberrypi-spy.co.uk/2012/06/… You have to adjust the pin connections to match your RPI board revision. Commented Oct 17, 2014 at 2:27
  • 1
    @sessyargc.jp thanks for the help. Finally we decided to go with a USB RFID-reader, and that works fine. We also noticed that there was a problem with our RFID tags too (wrong frequency), so for all I know, the reader configuration above is correct, and it was the tags that were creating the problem. Maybe I'll try it out just to see if we were correct all along, but for now, were on the USB.
    – Urban
    Commented Oct 17, 2014 at 2:47

2 Answers 2


Looks like the pins are not soldered in

  • The pins on what? Specificity is key.
    – Darth Vader
    Commented May 5, 2016 at 19:37
  • I think what he is attempting to convey is that he believes that the rfid tag has cables coming out of it that from the images do not look connected, the image shows a trace with a cable coming out on the flip side that does not seem to have anything soldered into the trace. Commented May 6, 2016 at 3:26

User46106 is probably right I read on other questions here that people had problems similar to yours and the solution was to solder the pins on the rfid-reader (you should always do that else you never can be sure if there is a connection + from the picture you posted it is obvious you didnt solder the pins on the reader module).

In the comments you mentioned that the rfid chips you used correspond to the wrong frequency? So you weren't able to read these tags with the usb-module?

Here are some decent tutorials on how to use the MFRC522-python library:



And here on how to work with the serial ports:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.