Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

modbus device-info

Connects to a Modbus device and performs two checks:

  1. Connectivity probe: reads holding registers 0–3 via FC03 to confirm the device accepts unauthenticated connections and returns data.
  2. FC43 MEI identification: sends a Read Device Identification request (function code 43, MEI type 14) to retrieve vendor name, product code, firmware revision and other identification strings.

Both checks run over a single connection. If FC43 is not supported or returns no objects, the connectivity finding is still reported.

Status

ResultMeaning
passConnection accepted (device is reachable and responded)
failCould not connect

Severity classification

SeverityCondition
HighUnauthenticated connection accepted
HighFC43 MEI identification objects returned
InfoFC43 not supported or returned no objects
InfoConnection failed

Usage

iottack modbus device-info --host <HOST> [OPTIONS]
iottack modbus device-info --serial <DEVICE> [OPTIONS]

Options

FlagShortDefaultDescription
--host <HOST>-H(required or –serial)Target hostname or IP for Modbus/TCP
--tcp-port <PORT>-502Modbus/TCP port
--serial <DEVICE>-s(required or –host)Serial device for Modbus RTU (e.g., /dev/ttyUSB0)
--baud <BAUD>-9600Baud rate for RTU serial
--unit <ID>-u1Modbus unit/slave ID (1–247)
--timeout-ms <MS>-t3000Timeout in milliseconds
--output <FILE>-o-Save result to a file
--format <FORMAT>-ftexttext or json
--verbose-v-Increase log verbosity

MEI identification objects

FC43 MEI type 14 defines the following object IDs:

IDLabel
0x00VendorName
0x01ProductCode
0x02MajorMinorRevision
0x03VendorUrl
0x04ProductName
0x05ModelName
0x06UserApplicationName
0x07–0x7FReserved
0x80–0xFFDeviceSpecific

The plugin tries all three conformity levels (basic 0x01, regular 0x02 and extended 0x03) and returns the first non-empty response.

Examples

Identify a device over TCP:

iottack modbus device-info --host 192.168.1.100

Non-standard port:

iottack modbus device-info --host 192.168.1.100 --tcp-port 5020

Identify over RTU serial, unit ID 3:

iottack modbus device-info --serial /dev/ttyUSB0 --baud 19200 --unit 3

Save result as JSON:

iottack modbus device-info --host 192.168.1.100 \
  --format json --output device-info.json

Example output

Plugin name:    modbus/device-info
Execution time: 0.42 s
Status:         pass

[HIGH] Modbus/TCP: unauthenticated connection accepted (unit 1)
  Device at 192.168.1.100:502 accepted a Modbus connection without
  authentication. Holding registers 0-3: [0x0000, 0x0001, 0x0000, 0x0042]
  Evidence: "Holding registers 0-3: [0x0000, 0x0001, 0x0000, 0x0042]"

[HIGH] Modbus/TCP: device identification retrieved via FC43 MEI (unit 1)
  Device exposes identification strings without authentication:
  VendorName: Acme Corp; ProductCode: PLC-4000; MajorMinorRevision: 2.1.0
  Evidence:
    0x00 VendorName: Acme Corp
    0x01 ProductCode: PLC-4000
    0x02 MajorMinorRevision: 2.1.0
    0x04 ProductName: Industrial Controller