DOCUMENTATION

RFID Reader Integration Manual

Comprehensive documentation covering serial communication setup, antenna configuration, tag encoding operations (EPC Gen2 / ISO 18000-6C), and power management. Includes examples for multi-antenna deployments and high-speed inventory scanning.

Serial Communication Setup

Nextwaves NRN protocol RFID readers communicate via serial port (RS-232 or USB-to-Serial). Connection parameters must be configured correctly to ensure stable data transmission.

Baud Rate

115200

Data Bits

8

Stop Bits

1

Parity

None

For browser-based WebSerial API connections, use Nextwaves Reader Connect at app.nextwaves.com/reader. The application auto-detects COM ports and configures connection parameters.

TypeScript — WebSerial Connection
// Request serial port access
const port = await navigator.serial.requestPort();
await port.open({
  baudRate: 115200,
  dataBits: 8,
  stopBits: 1,
  parity: "none",
  flowControl: "none",
  bufferSize: 4096,
});

// Get reader/writer streams
const reader = port.readable.getReader();
const writer = port.writable.getWriter();
Python — PySerial Connection
import serial

port = serial.Serial(
    port="/dev/ttyUSB0",      # Linux/macOS
    # port="COM3",            # Windows
    baudrate=115200,
    bytesize=serial.EIGHTBITS,
    stopbits=serial.STOPBITS_ONE,
    parity=serial.PARITY_NONE,
    timeout=2.0,
)

# Flush buffers before communication
port.reset_input_buffer()
port.reset_output_buffer()

Nextwaves NRN Protocol Frame Structure

Every NRN protocol command is encapsulated in a binary frame consisting of: Header (0x5A), PCW (Protocol Control Word), Category, MID (Message ID), Length, Data payload, and CRC16-CCITT checksum.

FieldSizeDescription
Header1 byteAlways 0x5A. start-of-frame marker
PCW2 bytesProtocol flags (version, address)
Category1 byteCommand category (0x00=System, 0x01=Device, 0x02=RFID)
MID1 byteMessage ID within category
Length2 bytesPayload length in bytes (big-endian)
DataN bytesCommand-specific payload
CRC162 bytesCRC16-CCITT checksum of bytes after header

Command Examples

QUERY_INFO — Query reader serial number & firmware
TX → 5A 00 01 01 00 00 00 DC E5
       ┌──┐ ┌────┐ ┌──┐ ┌──┐ ┌────┐ ┌────┐
       │5A│ │0001│ │01│ │00│ │0000│ │DCE5│
       └──┘ └────┘ └──┘ └──┘ └────┘ └────┘
       HDR   PCW   CAT  MID  LEN    CRC16
READ_EPC_TAG — Start continuous EPC tag inventory
TX → 5A 00 01 02 10 00 00 04 5A
       HDR  PCW   CAT MID LEN   CRC16
       
Response notifications (PID 0x1231) contain:
  • Antenna ID (1 byte)
  • RSSI value (1 byte, raw ADC 0-255)
  • EPC data (12+ bytes)
  • Frequency channel index (1 byte)
STOP_INVENTORY — Stop running inventory scan
TX → 5A 00 01 02 FF 00 00 88 5A
       HDR  PCW   CAT MID LEN   CRC16

Key Commands Reference

CommandCodeDescription
QUERY_INFO0x0100Query reader serial number and firmware versions
QUERY_RFID_ABILITY0x1000Query RFID capabilities (power range, antenna count)
READ_EPC_TAG0x0210Start continuous EPC tag inventory
WRITE_EPC_TAG0x0211Write data to a tag's EPC bank
STOP_INVENTORY0x02FFStop a running tag inventory
CONFIGURE_READER_POWER0x0201Set transmit power (0-33 dBm per antenna)
CONFIGURE_ANTENNA_ENABLE0x0203Enable/disable antenna ports (bitmask)
SET_WORKING_FREQUENCY0x0205Set specific working frequencies
SET_FILTER_SETTINGS0x0209Configure tag duplicate filter (time-based)
BUZZER_SWITCH0x011EControl buzzer mode

Antenna Configuration

RFID readers support up to 32 antenna ports. Each port is enabled or disabled via a 4-byte bitmask. Antennas are numbered 1 to 32, with each bit corresponding to a port.

Antenna Bitmask

Enable Antennas 1-4

0x0F, 0x00, 0x00, 0x00

Binary: 00001111 → Ports 1,2,3,4 ON

Enable Antennas 1 & 3 Only

0x05, 0x00, 0x00, 0x00

Binary: 00000101 → Ports 1,3 ON

CONFIGURE_ANTENNA_ENABLE — Enable ports 1-4
TX → 5A 00 01 02 03 00 04 0F 00 00 00 E1 EF
                              ┌───────────┐
       Payload:               │0F 00 00 00│ ← bitmask
                              └───────────┘
       Bit 0 = ANT1, Bit 1 = ANT2, Bit 2 = ANT3, Bit 3 = ANT4
       0x0F = 0b00001111 → all 4 ports enabled

Multi-Antenna Deployment

When deploying multiple antennas, consider polarization (linear vs. circular), spacing between antennas, and overlapping coverage zones. The reader scans sequentially through enabled antennas, and each tag report includes the antenna ID for position determination.

Dock Door

2-4 antennas per portal, circular polarization, 30 dBm power

Conveyor Belt

1-2 antennas per station, linear polarization, 20-25 dBm

Retail Shelf

Near-field antennas, low power 15-20 dBm, high density

Tag Encoding (EPC Gen2 / ISO 18000-6C)

UHF RFID follows the EPC Gen2 standard (ISO 18000-6C). Each tag has 4 memory banks: Reserved (passwords), EPC (96+ bit identifier), TID (immutable chip ID), and User (custom data).

Tag Memory Structure

BankIDTypical SizeUsage
Reserved0064 bitsKill password (32b) + Access password (32b)
EPC0196-128 bitsSGTIN-96, SSCC-96, or custom encoding
TID1096+ bitsChip manufacturer ID (read-only, unique)
User110-512 bitsApplication-specific data (chip-dependent)

SGTIN-96 Decoding Example

SGTIN-96 is the most common encoding for retail and supply chain products. Convert a 24-character hex EPC into GTIN-14, serial number, and GS1 Digital Link.

SGTIN-96 Decode — Example
EPC Hex: 3034257BF7194E4000001A85

Decoded:
  Header:         0x30 (SGTIN-96)
  Filter:         1 (Point-of-Sale)
  Partition:      5
  Company Prefix: 0614141
  Item Reference: 812345
  Serial:         6789
  GTIN-14:        80614141123458
  Digital Link:   https://id.gs1.org/01/80614141123458/21/6789
WRITE_EPC_TAG — Write EPC data to tag
// NRN protocol WRITE_EPC_TAG command
TX → 5A 00 01 02 11 00 0C [EPC_DATA_12_BYTES] [CRC16]

// The reader will:
// 1. Select the tag in its field
// 2. Write the provided EPC data to Bank 01
// 3. Return success/failure notification

// Access password required if tag is locked:
TX → 5A 00 01 02 11 00 10 [ACCESS_PWD_4B] [EPC_DATA_12B] [CRC16]

Use the online EPC Encoder tool at /tools/tds-rfid-converter to encode and decode SGTIN-96, SSCC-96, GRAI-96 directly in your browser.

Power Management

Reader transmit power is adjustable from 0 to 33 dBm per antenna port. Higher power increases read range but also increases interference and power consumption.

CONFIGURE_READER_POWER — Set 30 dBm on all 4 ports
TX → 5A 00 01 02 01 00 04 1E 1E 1E 1E 67 FE
                              ┌───────────┐
       Payload:               │1E 1E 1E 1E│
                              └───────────┘
       0x1E = 30 decimal = 30 dBm per port
       
Power guidelines:
  • 33 dBm — Maximum range (~10m), dock doors
  • 30 dBm — Standard range (~6-8m), general use
  • 25 dBm — Medium range (~3-5m), conveyor belts
  • 20 dBm — Short range (~1-2m), point-of-sale
  • 15 dBm — Near-field (~0.5m), shelf readers

RSSI Monitoring

RSSI (Received Signal Strength Indicator) values from tags are reported as raw ADC bytes (0-255). Use the conversion formula to get accurate dBm values.

Conversion Formula

dBm = -100 + round((raw × 70) / 255)

Raw 128

-65 dBm

Good

Raw 180

-51 dBm

Strong

Raw 220

-40 dBm

Excellent

High-Speed Inventory Scanning

For high-speed inventory scanning, configure working frequencies, duplicate tag filter, and continuous scan mode. Readers support up to 700 tags/second with optimal configuration.

Frequency Configuration

UHF RFID operates in the 920-925 MHz band (Southeast Asia), with 0.5 MHz channel spacing. Channels are numbered from 0 (920 MHz) to 10 (925 MHz).

SET_WORKING_FREQUENCY — 6 channels (920-925 MHz)
TX → 5A 00 01 02 05 00 06 00 02 04 06 08 0A C4 1B

Channel mapping (formula: 920.0 + index × 0.5 MHz):
  Ch 0  → 920.0 MHz
  Ch 2  → 921.0 MHz
  Ch 4  → 922.0 MHz
  Ch 6  → 923.0 MHz
  Ch 8  → 924.0 MHz
  Ch 10 → 925.0 MHz

Optimal Scanning Workflow

1

Configure antenna ports and power levels

2

Set working frequencies (FHSS for dense environments)

3

Configure duplicate filter (500ms-3000ms depending on use case)

4

Send READ_EPC_TAG to start continuous inventory

5

Process tag notifications (PID 0x1231) as they arrive

6

Send STOP_INVENTORY when done

Complete inventory flow — TypeScript
// 1. Enable antennas 1-4
await sendFrame("CONFIGURE_ANTENNA_ENABLE", [0x0F, 0x00, 0x00, 0x00]);

// 2. Set power to 30 dBm on all ports
await sendFrame("CONFIGURE_READER_POWER", [0x1E, 0x1E, 0x1E, 0x1E]);

// 3. Set working frequencies
await sendFrame("SET_WORKING_FREQUENCY", [0, 2, 4, 6, 8, 10]);

// 4. Set duplicate filter to 1000ms  
await sendFrame("SET_FILTER_SETTINGS", [0x03, 0xE8]);

// 5. Start inventory
await sendFrame("READ_EPC_TAG");

// 6. Process tags...
reader.on("tag", (tag) => {
  const rssiDbm = -100 + Math.round((tag.rssi * 70) / 255);
  console.log(`EPC: ${tag.epc}, Ant: ${tag.antenna}, RSSI: ${rssiDbm} dBm`);
});

// 7. Stop when done
await sendFrame("STOP_INVENTORY");