A Modbus scanner for iPhone: find devices and Unit IDs
Arrive at a site with no IP list and no Unit ID. FieldKit finds what answers Modbus on your Wi-Fi subnet, then finds the unit number behind a host.
Find devices
Tap Find devices. The app checks your IPv4 Wi-Fi subnet, up to a /24, on ports 502, 1502, 8899 and 4196. + Port adds your own, up to eight in total.
| Result | Meaning |
|---|---|
| Modbus TCP answers | A correct read came back |
| Device present, exception | A Modbus device answered with an exception, so the test register may not exist |
| RTU over TCP answers | A device answered the RTU probe, which points to a transparent converter |
| Port open, no Modbus answer | TCP is open, but no valid Modbus reply came back |
Tap a result to fill host, port, framing and Unit ID and connect. Save as profile keeps it for next time.
Scan Unit IDs
Use this when you know the host and port but the device stays silent. Quick tries 1 to 10, plus 0 and 255 on Modbus TCP. All tries 1 to 247. Requests go one at a time, with a timeout of about 300 ms, so a full scan takes about 75 seconds.
The results list answers with values, answers with exceptions and silent ranges. Illegal Data Address still means the unit exists. Gateway exceptions 0A and 0B don’t count as found. More about the Unit ID.
What it sends
Both scans send function code 03, address 0, quantity 1. Find devices uses Unit ID 1. They write nothing. They also start only when you tap, and they don’t run in the background.
The current client session disconnects before a Unit ID scan, to free the connection slot. Close other pollers if a gateway allows one client at a time, and be careful on a busy production bus.
Limits to know
No mDNS or Bonjour, no IPv6, and no subnets other than your own on iOS. Cellular and VPN-only connections give the app no range to scan. Results stay on the device.