Skip to content

Spec-conformant wire: A.1.6 checksum, A.1.5 reply layout, ISDU FlowCTRL/CHKPDU, indices, timing - #24

Merged
w1ne merged 25 commits into
developfrom
feat/spec-wire-checksum-isdu
Sep 18, 2026
Merged

w1ne merged 25 commits into
developfrom
feat/spec-wire-checksum-isdu

Conversation

@w1ne

@w1ne w1ne commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Fixes #23 (device side).

Breaking wire change: the device now speaks the IO-Link V1.1.5 wire byte for byte. Nothing built against the previous checksum or ISDU framing can talk to it.

  • Message checksum per A.1.6: XOR with seed 0x52, compressed 8 to 6 bits. Test vectors derived from the spec formula and cross-checked against lwIOLink.
  • Reply layout per A.1.5: [PD-in][OD] CKS, Event flag bit 7, PD-invalid bit 6. No leading status octet.
  • OD dispatch by communication channel (Page, Diagnosis, ISDU); CKT type bits honoured; illegal M-sequence type returns to STARTUP.
  • ISDU transport per 7.3.6 / A.5: FlowCTRL in the MC address (START, COUNT, IDLE, ABORT), Length/ExtLength counting every octet, CHKPDU, Busy and No Service octets, Annex C error types. Byte-exact tests for the Figure A.20 examples.
  • Diagnosis channel serves the Table 58 event memory; StatusCode write acknowledges events; SystemCommand is write-only.
  • Standard index map per Table B.8 (0x0020 ErrorCount, 0x0024 DeviceStatus, 0x0025 DetailedDeviceStatus, vendor objects at 0x0040+); DeviceID is 3 octets; M-seqCapability codes per Table A.10.
  • Timing: single T_REN (500 us), T_WU, T_DSIO, T_FBD.
  • Python virtual master and the conformance suite drive the new wire.

Verification: 22/22 ctest, check_quality.sh clean, 14 virtual-master unit tests, conformance suite 48/49 (the remaining failure, test_04_pd_exchange_consistency, is host scheduling jitter and fails on unmodified develop too).

Design and plan: docs/superpowers/specs/2026-09-18-spec-conformant-wire-design.md, docs/superpowers/plans/2026-09-18-spec-conformant-wire-device.md.

w1ne added 25 commits September 18, 2026 02:47
@w1ne
w1ne merged commit 46f9c69 into develop Sep 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire format is not IO-Link V1.1.5 conformant (checksum, ISDU framing, reply layout, indices, timing)

1 participant