Industrial protocol analyzer. Modbus TCP and CAN bus decoding with time-series logging.
SCADA Systems Engineer (entry-level) · Automation & Controls Engineer (entry-level) · PLC Programmer (entry-level) · Instrumentation & Controls Engineer · Control Systems Engineer · Field Automation Engineer
See docs/modbus-output.json and docs/can-log.csv. Both are reproducible:
tests/test_modbus.py asserts that a scan against a live slave returns exactly
the committed JSON, and docs/can-log.csv is generated by analyzer.obd.
pip install -r requirements.txt
python -m analyzer modbus --host 192.168.1.10 --start 0 --count 10
python -m analyzer can --interface can0 --seconds 30Modbus TCP — FC03 read holding registers. parse_mbap / parse_pdu return
{"error": ...} rather than raising on truncated frames, odd byte counts, or
exception responses, and scan() does the same for transport failures, so a
caller always gets something it can write to a report.
CAN — OBD-II mode-01 responses on 0x7E8–0x7EF, decoded as ISO 15765-2
single frames: byte 0 is the PCI, byte 1 the response SID 0x41, byte 2 the
PID, byte 3 onward the payload. Multi-frame transfers are recognised and
skipped rather than mis-decoded.
pip install pytest
python -m pytest tests -q28 tests, no hardware needed: the Modbus tests run against a throwaway TCP slave bound to an ephemeral localhost port, and the CAN tests use real frame bytes including negative responses, truncated frames, and multi-frame PCIs.
Modbus TCP read-holding-registers with robust framing errors, CAN/OBD-II PID decode with correct ISO-TP indexing, CSV logging, test suite, CI.
DNP3 and OPC UA are not implemented. No Modbus RTU yet. Multi-frame ISO-TP
transfers are skipped, not reassembled. No live dashboard yet. The CAN path has
not been run against a real socketcan interface here — only decode_frame has.
MIT