This is my first project and I'm trying to use a DOIT ESP32 DevKit v1 along with a PN532 to do a simple read. At this point, I'm having trouble even with a simple "GetFirmwareVersion" command working. I have a sample project here showcasing my current code and how it's wired up, but when I send the GetFirmwareVersion command, I get an invalid response.
I have also tried doing a read but that fails too, hence trying a basic GetFirmwareVersion command to see if communication is working.
Any insight is greatly appreciated
esp-idf not able to communicate with PN532
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: esp-idf not able to communicate with PN532
1) Make sure you initialize all fields in the config structures
2) I guess the PN532 uses half-duplex transfers; check and set up the device accordingly (cf. SPI EEPROM example)
3) You seem to be only sending the command but not transfering enough bytes to also receive the response.
2) I guess the PN532 uses half-duplex transfers; check and set up the device accordingly (cf. SPI EEPROM example)
3) You seem to be only sending the command but not transfering enough bytes to also receive the response.
Re: esp-idf not able to communicate with PN532
Hi,
i have the same module and recently i have had to write my own library for it. My library is using UART instead of SPI, so im not sure it is the case, but before you can communicate with that module you have to send wakeup command to it.
I learned it hard way, but existing arduino libraries are very helpful here.
i have the same module and recently i have had to write my own library for it. My library is using UART instead of SPI, so im not sure it is the case, but before you can communicate with that module you have to send wakeup command to it.
I learned it hard way, but existing arduino libraries are very helpful here.
Who is online
Users browsing this forum: No registered users and 2 guests