> For the complete documentation index, see [llms.txt](https://docs.mtoolstec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mtoolstec.com/hardware/rfid-nfc-and-uhf-hardware/all-in-one-pn532/host-development.md).

# Host Software and Development

All-In-One PN532 uses the PN532 HSU command protocol. Develop the host application rather than trying to flash a PN532Killer binary onto the reader.

## Python CLI

Download and install the stable [PN532 CLI](https://github.com/whywilson/pn532-python) using [Connect and Scan](/hardware/rfid-nfc-and-uhf-hardware/all-in-one-pn532/quickstart.md). The source includes:

| File                       | Purpose                                       |
| -------------------------- | --------------------------------------------- |
| `script/pn532_cli_main.py` | Interactive prompt and command dispatch       |
| `script/pn532_cli_unit.py` | Command registration, arguments, and handlers |
| `script/requirements.txt`  | Python dependencies                           |

Use group help to inspect the installed command tree:

```
hw
hf 14a
hf mf
hf mfu
ntag
```

Commands are case-sensitive. Stable `main` and development `dev` have different command availability; use built-in help for the selected build.

## Read a Known MIFARE Classic Block

After connecting and scanning a tag, read an application block with its known Key A:

```
hf mf rdbl --blk 4 -a -k FFFFFFFFFFFF
```

This example assumes that block 4 is readable with the supplied key. Replace the example key with the actual key. Authentication failure is different from a disconnected reader.

## libnfc

Use [libnfc](https://github.com/nfc-tools/libnfc) with a PN532 UART connection string. Add a device entry to the installed package's `libnfc.conf`:

```ini
device.name = "All-In-One PN532"
device.connstring = "pn532_uart:/dev/ttyUSB0"
```

Replace the port with the reader's serial path. Close PN532 CLI before opening the reader with libnfc, then test:

```bash
nfc-list
```

For PN532 frame layouts and controller commands, consult the [NXP PN532 User Manual](https://www.nxp.com/docs/en/user-guide/141520.pdf). Keep NFC protocol commands separate from host USB serial configuration.

## Firmware Scope

There is no module-firmware build procedure for the stock PN532 controller in this workflow. Bluetooth-extension software is a separate project and hardware target. Do not install PN532Killer `.bin` or GroveNFC `.uf2` images on All-In-One PN532.
