Discover a SunSpec Modbus device's model map by scanning well-known base registers and parsing chained model blocks.
domain: sunspec.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Attempt to read holding registers at each candidate base address in turn — 0, 40000, and 50000 — since the SunSpec Device Information Model spec permits any of the three as the map's starting point.
Look for the fixed 32-bit 'SunS' marker split across the first two registers at that base (ASCII 'SunS' = 0x53756E53); its presence confirms a SunSpec map.
Confirm which Modbus addressing convention your stack/device uses (register 'address 0' vs. the human-readable '40001' naming) before computing offsets.
Read the next two registers after the marker as the first model block header: a 16-bit Model ID followed by a 16-bit Length (in registers) — this first block is normally the SunSpec Common Model (ID 1).
Read the following Length registers as that model's data per the SunSpec Information Model definition for that Model ID; skip unrecognized/vendor-private Model IDs using their declared Length rather than erroring.
Advance past the block (header + Length registers) and repeat, chaining through subsequent blocks until a block with Model ID 0xFFFF (End Model) and Length 0 is reached.
Known gotchas
The two SunS marker registers sit outside the Common Model block itself — the first model header begins two registers after the marker, not at the base address.
Base address 0 is more prone to collisions with unrelated, non-SunSpec Modbus register maps on gateways/multi-protocol devices, so a marker match there should be treated cautiously.
Unknown Model IDs must be skipped by their declared Length field, not an assumed fixed size, or the parser will desynchronize from the rest of the chain.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?