![[Help] MFRC522 with Raspberry Pi 5 hanging indefinitely](https://external-preview.redd.it/yaV848AHRI62FPmcUsBOH04eHaHqj-P6RPsCZBmNJJw.png?width=1080&crop=smart&auto=webp&s=39e6d81d7139e69bd63190876735252e11b7f87b)
[Help] MFRC522 with Raspberry Pi 5 hanging indefinitely
Hey everyone,
My name is Thiago and I’m a Computer Engineering student currently working on a full-stack open-source project called eduAssets (an asset management system for schools). I’m trying to implement a quick admin login using RFID, but I've hit a wall with the hardware integration and could really use some guidance from the experts here.
My Setup includes: Board: Raspberry Pi 5 (16GB) running Ubuntu**, Module:** Standard MFRC522 Kit (13.56MHz), Tags: The blue keychain tags that came in the box**, Library/Language:** Python using spidev (custom implementation, you can check the rpi folder in my repo if needed).
I have SPI enabled in the OS and I'm running my script with sudo to rule out any permission bottlenecks. When I run my provisioning script (provision_card.py), the terminal successfully prints "Waiting for card...".
But then... nothing happens. I tap the blue tag to the reader, and the script just stays completely stuck. It doesn't throw an SPI initialization error, it doesn't crash, it just acts like the card isn't even there. It hangs in an infinite while True loop inside the MFRC522_Request function until I eventually force a KeyboardInterrupt (Ctrl+C).
Is this just a physical connection issue? Full disclosure: the male header pins are currently just resting inside the holes of the MFRC522 blue board and pushed into the breadboard. (I haven't soldered them and cant do it really because its not mine) The red power LED on the module turns on fine, but could the lack of solder be causing data loss on the SPI lines (MOSI/MISO/SCK) due to poor contact at high frequencies (1MHz)?
Or could this be a software/communication issue? Are there any known quirks with the Pi 5's SPI bus and this specific module that would cause a silent hang rather than an explicit error?
I am going to try attaching some pictures of my breadboard and wiring setup in the post or comments.
Has anyone experienced this silent hanging behavior before? I'm not an expert programmer or a hardware pro, I'm just trying to learn and develop new projects, so I’d really appreciate any advice, even if it's just telling me to stop being lazy and go find out myself, or answer me with a video or guide!
Edit: Wiring Pictures Here are the pictures of my current breadboard and wiring setup for context: