Modbus Slave ID / Unit ID - Knowledge Base

Modbus slave ID and unit ID overview covering device addressing for RTU serial and TCP networks, broadcast behavior, and common configuration mistakes.

Categories:

What Slave ID / Unit ID Is

Every Modbus device on a network needs a unique address so the client (master) can target requests to a specific device. This address is called the Slave ID in Modbus RTU / serial contexts and the Unit ID in Modbus TCP contexts. Functionally, they serve the same purpose — device identification.

Address Ranges

ContextFieldValid RangeNotes
Modbus RTUSlave ID1–247First byte of the RTU frame
Modbus TCPUnit ID0–255Byte 7 of the MBAP header
BroadcastAddress 0All devices execute, none respond

[!NOTE] Addresses 248–255 are reserved in the Modbus serial specification and must not be used for RTU slave devices.

Slave ID vs Unit ID

AspectSlave ID (RTU)Unit ID (TCP)
TransportRS-485 serial frameTCP/IP MBAP header
UniquenessMust be unique on each serial busOften set to 1 or 255 for standalone TCP devices
Gateway behaviorN/ARoutes to a specific RTU slave behind the gateway
DefaultVendor-configured (commonly 1)Often 1 or 255

When a Modbus TCP device is a standalone server (not a gateway), the Unit ID is typically set to 1 or 255 — many devices accept either. When a Modbus TCP gateway bridges to Modbus RTU slaves behind it, the Unit ID in the TCP request maps directly to the RTU Slave ID of the target device.

Common Issues

  • Duplicate addresses — Two devices with the same Slave ID on the same RS-485 bus cause garbled responses or bus collisions. Always verify unique addressing before commissioning.
  • Address 0 surprises — Some devices (notably solar inverter arrays) only respond to broadcast address 0. This creates complications when multiple devices share a bus, since broadcast requests elicit no responses.
  • Unit ID ignored — Some Modbus TCP devices ignore the Unit ID field entirely and respond to any value. Others are strict. Test with the expected Unit ID first, then try 1 and 255 if the device doesn’t respond.
  • Unit ID 0 vs 255 — In TCP, Unit ID 0 can mean “broadcast” on some implementations and “this device” on others. Unit ID 255 is interpreted as “this device” by most standalone TCP servers.

[!WARNING] When configuring a FieldServer or QuickServer as a Modbus TCP-to-RTU gateway, the Unit ID in incoming TCP requests maps to the Slave ID on the serial side. Confirm that the Unit ID your BMS sends matches the actual Slave ID of the target RTU device.

Need more help?

If this page does not resolve the issue, contact Chipkin support with the product model, protocol details, and any diagnostics you have already captured.

Open Chipkin Support