Modbus Device Discovery & Network Scanning Guide

How to discover unknown Modbus devices on RS-485 and TCP networks — scanning address ranges, identifying baud rates, mapping registers, and building a device inventory from scratch when documentation is unavailable.

Categories:

Overview

Discovering Modbus devices on a network when you have no documentation — or the documentation is outdated — is one of the most common tasks in building automation commissioning. Unlike BACnet, which has built-in discovery mechanisms (Who-Is / I-Am), Modbus has no native discovery protocol. Finding devices requires methodical scanning.

This guide covers the process of discovering Modbus devices on both serial (RS-485) and Ethernet (TCP) networks, from identifying communication parameters to mapping unknown register spaces.

Modbus Device Discovery Flowchart

Why Modbus Has No Discovery

Modbus was designed in 1979 for a master/slave architecture where the master already knows which devices are on the bus. The protocol has no mechanism for:

  • Devices announcing their presence
  • Masters querying “who is on the network?”
  • Auto-negotiation of baud rate, parity, or addressing

Every discovery operation is performed by brute-force polling — sending requests to each possible address and observing which addresses respond.

Modbus RTU Discovery (RS-485)

Step 1: Determine Serial Parameters

Before scanning addresses, you must use the correct baud rate, parity, and data bits. If these are unknown, try the most common configurations:

PriorityBaud RateData/Parity/StopNotes
19,6008N1Most common in field devices
29,6008E1Specification default
319,2008N1Common for newer devices
419,2008E1Second-most common
538,4008N1Higher-speed installations
6115,2008N1Some modern devices

Process:

  1. Set the scanner to the first configuration (9600, 8N1)
  2. Send a read request to address 1 (FC03, register 0, count 1)
  3. If you get a valid response → baud rate and parity found
  4. If timeout → try the next configuration
  5. Repeat until you find a combination that produces a response

[!TIP] If you can physically access a device, check its display panel or label for serial settings. Many devices print the baud rate on a sticker or display it in a setup menu. This saves significant time vs trial-and-error scanning.

Step 2: Scan Address Range

Once serial parameters are confirmed, scan the valid Modbus address range:

RangeAddressesDescription
Full scan1 – 247All valid Modbus addresses
Common range1 – 32Most installations use low addresses
Quick scan1 – 10Small installations

For each address, send a simple read request:

  • FC03 (Read Holding Registers), register 0, count 1
  • If exception 01 (Illegal Function), try FC04 (Read Input Registers)
  • If any response (data or exception), the address is occupied
  • If timeout (no response), the address is empty (or the device is offline)

Scan Timing

ParameterRecommended ValueNotes
Response timeout500 msAllow for slow devices
Inter-request delay50 msPrevent bus congestion
Time per address (worst case)~550 msTimeout + delay
Full scan (247 addresses)~2.5 minutesAt 9600 baud with 500ms timeout
Quick scan (32 addresses)~18 secondsSame parameters

[!NOTE] Use short response timeouts for scanning (500ms) even though production polling might use longer timeouts. If a device doesn’t respond within 500ms during discovery, it’s either not present or not functional — move on.

Step 3: Confirm Device Identity

For each responding address, try to identify the device:

MethodFunction CodeWhat You Learn
Read Device IDFC43/14 (MEI Type)Vendor name, product code, revision (if supported)
Report Server IDFC17Device-specific ID string (if supported)
Read known registersFC03/04Model number, firmware version, serial number (if documented)

[!WARNING] FC43 (Read Device Identification) and FC17 (Report Server ID) are optional and rarely supported by field devices. Don’t rely on them — most devices will return exception 01. In practice you will need to identify devices by: physical inspection, label reading, or comparing register values to known documentation.

Modbus TCP Discovery (Ethernet)

Step 1: Find Devices on the Network

Before Modbus-level scanning, identify which IP addresses have Modbus TCP servers:

MethodToolWhat It Finds
Port scan for TCP 502CAS Modbus Scanner, nmapIP addresses listening on the Modbus port
ARP scanNetwork scannerAll devices on the subnet (MAC addresses)
DHCP lease tableRouter/switch admin pageIP addresses assigned by DHCP
Static IP documentationProject filesPre-configured addresses

Step 2: Scan Unit Identifiers

Each Modbus TCP device may host multiple logical devices via different Unit Identifiers:

ScenarioUnit ID Range to Scan
Direct TCP device (no gateway)Try 0x01 and 0xFF (255)
TCP-to-RTU gatewayScan 1–247 (maps to serial slave addresses)
UnknownStart with 1, then 255, then scan 1–32

For each IP address that has port 502 open:

  1. Connect via TCP to port 502
  2. Send FC03, register 0, count 1, with Unit ID = 1
  3. If valid response → record the device
  4. If exception 0A/0B → the Unit ID doesn’t map to a downstream device (try others)
  5. Repeat for other Unit IDs as needed

[!TIP] If a device responds to all Unit IDs with the same data, it’s likely a direct TCP device that ignores the Unit Identifier field. If it responds to specific Unit IDs and returns exception 0B for others, it’s a TCP-to-RTU gateway routing to serial devices.

Register Mapping (Unknown Devices)

Once you’ve found a device but have no register documentation, you can explore the register space by reading sequential blocks:

Systematic Register Exploration

  1. Read registers 0–99 (FC03) — look for non-zero values
  2. Read registers 0–99 (FC04) — the device may use input registers
  3. Read coils 0–99 (FC01) — check for discrete outputs
  4. Read discrete inputs 0–99 (FC02) — check for discrete inputs

For each block of responding registers, note:

PropertyWhat to Look For
Non-zero valuesLikely contain live data
Values that changeSensor readings, status values
Values near 0 or 65535Potential signed values (negative temperatures) — see scaling guide
Sequential 0sUnused or reserved register range
Exception 02 at specific addressesEnd of valid register range

Identifying Data Without Documentation

Register Value PatternLikely Content
200–300 (FC03)Temperature in 0.1°F or 0.1°C (20–30°C or 68–86°F)
0 or 1 (FC01)Switch/relay state (on/off)
Slowly incrementingCounter (runtime hours, energy total)
~500–1013Barometric pressure in 0.1 mbar
Large number that swingsAnalog value with multiplication factor
0xFFFF (65535)Unused / error / not configured

[!CAUTION] Never write to unknown registers during discovery. Some registers control physical outputs (relays, actuators, setpoints). Writing arbitrary values to an unidentified register could cause equipment damage or safety hazards. Only read during discovery.

Finding 32-Bit Values

Look for pairs of adjacent registers where:

  • Both registers change together
  • Individual register values don’t make sense alone
  • The device documentation (if partially available) mentions “double register” or “32-bit”

Try interpreting the pair as a 32-bit value in both word orders — see Modbus Data Types & Byte Order Reference.

CAS Modbus Scanner Discovery Features

The CAS Modbus Scanner provides automated discovery workflows:

FeatureWhat It Does
Address scanPolls address range 1–247, reports responding devices
Auto-detect baud rateTries common baud rates and parity settings automatically
Register map readReads contiguous register blocks and displays values
Data type interpretationShows values as 16-bit unsigned, signed, float (both word orders)
Continuous monitoringPolls selected registers repeatedly, highlights changing values

Discovery Workflow with CAS Modbus Scanner

  1. Connect to the RS-485 bus or specify the TCP IP address
  2. Auto-detect serial parameters (baud, parity) if unknown
  3. Scan the address range — the scanner reports all responding addresses
  4. Read register blocks from each discovered device
  5. Monitor changing values to identify live sensor data
  6. Export the findings for gateway configuration

Building a Device Inventory

After discovery, document each device:

FieldExample
Address1
IP (if TCP)192.168.1.100
Manufacturer(from label or FC43)
Model(from label or register)
Baud/Parity9,600 / 8N1
Responding FCsFC03, FC04, FC06
Active register range0–49 (FC03), 0–19 (FC04)
Known data pointsReg 0 = temperature, Reg 1 = humidity
Physical locationBuilding A, Mech Room, Panel 3

[!TIP] Take photos of device labels during the site visit. Labels often contain model numbers, serial numbers, and MAC addresses that help identify the correct register map documentation later. Many manufacturers publish register maps on their websites if you know the exact model number.

Troubleshooting Discovery Issues

ProblemLikely CauseFix
No devices respond on any addressWrong baud rate/parity, wiring fault, or devices powered offTry all common serial parameter combinations; verify power and wiring
Device responds to some FCs but not othersNormal — device doesn’t support all function codesDocument which FCs work and use those
All addresses return the same dataStar topology causing bus reflections; or device responding to all addressesCheck wiring topology; isolate devices one at a time
Discovery finds devices that don’t existBus reflections or noise causing false positiveAdd proper termination; reduce scan timeout to 300ms
TCP port 502 is open but all requests timeoutDevice requires specific Unit ID; or device is busyTry Unit IDs 1 and 255; check if another client has the connection
Device found but register reads all return 0Wrong register range, or device is in initialization modeTry higher register ranges (100+, 1000+); wait for device to finish startup

Chipkin Tools

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