How to DIY PN532 BLE with ESP32

PN532 can work with Bluetooth SPP and BLE. In 2020, we created a post about How to make PN532 work on Bluetooth and make your PN532 module can work with MTools and RFID Tools App via Bluetooth SPP(Serial Port Profile) connection. And you can access some advanced operations to the Magic tags. Later on the autumn of 2020 we published MTools BLE App for PN532 work with BLE module. Now in this tutorial, we’ll update new option to connect PN532 with ESP32 module via BLE. This requires a firmware flashing to ESP32.

How does it work?

The ESP32 acts as a bridge between the PN532 module and your mobile device. By flashing the ESP32 with the firmware from the ESP32-PN532 repository, it enables BLE communication. This allows the MTools BLE App to interact with the PN532 module for advanced RFID operations.

How to wire ESP32 with PN532?

To connect the PN532 module to the ESP32, follow the wiring diagram provided in the connection guide. Ensure the following connections:

  • GPIO 17 (TX2) to PN532 RX
  • GPIO 16 (RX2) to PN532 TX
  • GND to PN532 GND
  • VCC to PN532 VCC

Notice:

  • You can also change the PIN according to your ESP32 board and flash the firmware with the new PINs.
  • Double-check all connections to avoid short circuits.
#define TXD_PIN 17 // GPIO1 (TX)
#define RXD_PIN 16 // GPIO3 (RX)

How to connect to MTools BLE App?

  1. Flash the ESP32 with the firmware from the ESP32-PN532 repository.
  2. Power on the ESP32 and PN532 modules.
  3. Open the MTools BLE App on your mobile device.
  4. Search for the ESP32 BLE device and connect to it.
  5. Once connected, you can start performing operations such as reading and writing RFID tags.

Features of MTools BLE with PN532

With the MTools BLE App and PN532, you can:

  • Read and write all Mifare Classic magic cards, including Gen1a, Gen2, Gen3, and Gen4.
  • Support Mifare Ultralight tags.
  • Perform advanced operations with Terminals
  • Run UID Changer for all kinds of ISO14443A magic tags.

Show Cases

Leave a Reply

Your email address will not be published. Required fields are marked *