How to Read ST25TB / SRI512 / SRT512 NFC Cards with Moetes PN532 Module

How to Read ST25TB / SRI512 / SRT512 NFC Cards with Moetes PN532 Module

Introduction

The ST25TB family (including SR176, SRI512, SRI2K, and SRI4K) are popular NFC/RFID tags from STMicroelectronics. These tags use the ISO14443-2B protocol and are commonly found in transport cards, ski passes, and access control systems.

In this tutorial, we’ll show you how to read ST25TB cards using the Moetes PN532 NFC Module with Raspberry Pi.

What is ST25TB?

ST25TB is a family of contactless memory chips operating at 13.56 MHz. Key characteristics include:

  • Protocol: ISO14443-2B (Type B)
  • Memory: Varies by model (176 bits to 4 Kbits)
  • UID: 8-byte unique identifier
  • Applications: Public transport, ski passes, access control, loyalty cards
ModelMemory SizeBlocks
SR176176 bits11
SRI512512 bits16
SRI2K2 Kbits64
SRI4K4 Kbits128

Hardware Requirements

  • Moetes PN532 NFC Module
  • Raspberry Pi (3B+, 4, or 5)
  • Jumper wires
  • ST25TB card (SR176, SRI512, SRI2K, or SRI4K)

Wiring Diagram

Connect the PN532 module to your Raspberry Pi using UART:

PN532 ModuleRaspberry Pi
VCC5V (Pin 4)
GNDGND (Pin 6)
RXDTXD (GPIO 14, Pin 8)
TXDRXD (GPIO 15, Pin 10)

Note: Ensure the PN532 module is configured for UART mode. Check the interface selection pins/jumpers on your breakout board. TXD on PN532 connects to RXD on Pi, and vice versa (cross-connection).

Software Setup

Enable UART on Raspberry Pi

sudo raspi-config
# Navigate to: Interface Options -> Serial Port
# - Login shell over serial: No
# - Serial port hardware enabled: Yes
sudo reboot

Install Required Libraries

# install dependencies
sudo apt-get install git autoconf libtool libusb-dev tree

# clone and build libnfc
git clone https://github.com/nfc-tools/libnfc
cd libnfc

# setup PN532 configuration
sudo mkdir -p /etc/nfc/devices.d
sudo cp contrib/libnfc/pn532_uart_on_rpi_3.conf.sample /etc/nfc/devices.d/pn532_uart_on_rpi_3.conf

# build libnfc
autoreconf -vis
./configure --with-drivers=pn532_spi,pn532_i2c,pn532_uart --sysconfdir=/etc --prefix=/usr
make
./examples/nfc-st25tb

Reading ST25TB Tag