HomeKey-ESP32 icon indicating copy to clipboard operation
HomeKey-ESP32 copied to clipboard

No recovery from failed PN532 communication

Open pnuding opened this issue 11 months ago • 4 comments

I’ve got a reader in a place with a wifi antenna, switching power supply and 230v wiring all nearby. It was rock solid when I tried it for a week at my desk without these noisy neighbours. But with all this interference it seems to loose the communication with the PN532 after a while and when it does it never recovers until i reset it. In this state it’s reachable via Mqtt and works normally in HomeKit but no longer responds to nfc tags or homekeys. I’ve managed to improve the wiring SPI placement so it now lasts a day instead of a few hours, but it would probably be a good idea to retry if SPI with the pn532 fails

pnuding avatar Mar 24 '24 18:03 pnuding

Hi there!

Thank you for reporting this, it is on my list of things to improve, however, the issue is, unlike I2C there is no real way of detecting the presence of an SPI slave but there is some code trickery which can be done that i'll be looking into.

Side Note: It was actually supposed to be I2C but i had some issues with it so i picked SPI instead, i might actually try to make I2C work to see how it behaves.

rednblkx avatar Mar 26 '24 16:03 rednblkx

Perhaps it's as simple as starting over with the SPI communication every now and then. That alone would make it much more robust irrespective of whether it's necessary in that moment or not

pnuding avatar Mar 26 '24 16:03 pnuding

sadly i ran into the same problem. worked perfect on my desk but no it works for just some hours and than needs a "reboot".

da2001 avatar May 26 '24 17:05 da2001

I've managed to solve it on the hardware side here - lots of aluminium tape and moved the esp32 to a box apart from the other stuff (and some aluminium tape around the walls of the box, just in case 😆 )

pnuding avatar May 26 '24 18:05 pnuding