DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
pn532.h File Reference

PN532 NFC frame codec (DETWS_ENABLE_PN532) - NXP PN532 NFC/RFID controller. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

PN532 NFC frame codec (DETWS_ENABLE_PN532) - NXP PN532 NFC/RFID controller.

The command-frame protocol of the NXP PN532 (the ubiquitous NFC reader on I2C / SPI / HSU breakouts): a tag read/write bridged to an HTTP / MQTT event. The host and the chip exchange normal information frames:

00 | 00 FF | LEN | LCS | TFI | PD0..PDn | DCS | 00

where TFI is 0xD4 (host -> PN532) or 0xD5 (PN532 -> host), LEN counts TFI + PData, LCS is the length checksum (LEN + LCS == 0), and DCS is the data checksum (TFI + sum(PData) + DCS == 0). A short 6-byte ACK frame (00 00 FF 00 FF 00) confirms each command.

pn532_build_frame() assembles a frame carrying a command + parameters, pn532_parse_frame() frames + verifies a response, and pn532_is_ack() detects the ACK. The per-command PData (GetFirmwareVersion, InListPassiveTarget, InDataExchange, ...) is the application's. Pure - you carry the bytes over your I2C / SPI / UART - so it is fully host-testable.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file pn532.h.