HomeKey-ESP32
HomeKey-ESP32 copied to clipboard
Didn't find PN53x board
I have this error. PN532 is correctly connected with LED on. Wiring is correct according guide.
I use this board
What I'm doing wrong?
Hi there!
I've previously had a similar report, so we'll start there.
How are you powering the PN532? Hopefully from the board as noted in the guide as they have to share a voltage reference.
Are you using the 5V or the 3V3 pin?
Powering is from the board. I've tried 3v3 and 5v. LED on the RFID board is on but it doesn't do anything.
I have a slightly different ESP32 board, but same issue - NFC reader not recognized:
I (2997) gpio: GPIO[5]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (3000) gpio: GPIO[18]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (3009) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (3019) gpio: GPIO[23]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (3041) NFC_SETUP: Didn't find PN53x board
I have Wifi working, I get MQTT updates in HomeAssistant, I can flip the Lock using the Home app (and get the updates in HomeAssistant), but the NFC reader does not recognize anything (no iPhone, also not Mifare/ISO14443 cards or NTAG213 or similar. the NFC reader is connected to the VCC (5V) of the ESP, GND aswell. Model is a red PN532 from elechouse, but may be one of the 'cheap' variants. I double checked the cabling, should be as documented. Any ideas on how to debug? I also tried another Poweradaptor (besides the USB connection to the pc).
I have no idea what is wrong.
I have the same problem, any ideas?
I did quite some testing and debugging - so far no success, here's what I tried:
- use a separate 5V power for the PN532 board - and, important, connect the GND from the PN532 and the GND of the ESP. No change.
- replaced the wires, checked correct wiring, no change
- I then used a sample sketch from the lib directory of the PN532 library used in this project (readMifare.pde), this shows a similar error 'Didn't find PN53x board'.
- I currently only have this single PN532 board (which is for sure one of the cheap elechouse clones (V3), so maybe hardware issue?
- my ESP32 is a 30 Pin board, type esp32doit-devkit-v1
- last option I want to test, use another ESP32 board (todo)
did anybody try with other connections types via I2C or Serial?
Ran into the same issue. My board has this really small dip switch and I had to flip switch number 2 so the board would work over SPI. This is how I have it working now.
@gpambrozio You are right. This solved my issue. It should be mentioned in Setup Wiki
gpambrozio You are right. This solved my issue. It should be mentioned in Setup Wiki
A PN532 NFC Module This needs to use the SPI protocol For the red board from Elechouse, there should be a DIP Switch on it and a small table to the side that indicates the switches states for each protocol, for SPI this should be 0 and 1 which means left ⬅️ switch down ⬇️ and right ➡️ switch up ⬆️
I had already moved the DIP switches for SPI operation but it still doesn't work…
@gpambrozio You are right. This solved my issue. It should be mentioned in Setup Wiki
https://github.com/rednblkx/HomeKey-ESP32/wiki/Prerequisites#hardware-and-software
I've been working on refactoring the pn532 driver to use the esp-idf APIs and there seems to be an issue on the driver with SPI and the waking up sequence of the pn532 though that should only affect the first command but in some cases it starts a chain reaction, however, i've managed to find a workaround(not sure if it's also the solution).
Anyone that still has issues, please try the esp-homekit-sdk
branch and let me know if it still shows the same error.
Note that this is not a usable version at the moment, it lacks the mqtt implementation, it's just a environment to test the "new" nfc driver.
Hi @rednblkx, I tried your esp-homekit-sdk
branch, unfortunately same result for me, does not find the board.
To rule out a general issue with the board, I gave it a try with the plain esphome pn532 library. Using SPI same issues, I cannot get the board to work. I then tried I2c (changing the DIP Switches), and this works on ESPHome (just basic reading of Mifare cards). So it look like the board itself works, but I found others having similar issues in general with this elechouse V3 clone using SPI. So currently I am unsure if this is a weakness of this board in general, or if mine maybe has broken SPI support. Would your project also work on I2c in general? Or do you see any ways forward in maybe additional debugging I could help to get it to work? Thanks.
@topt please open a new issue so we can debug this as i'll be closing this one since it was determined to be user error.