Skip to content

s7: explain V1-initial firmware-band fallback to users#721

Open
gijzelaerr wants to merge 1 commit intomasterfrom
doc-v1-initial-limitation
Open

s7: explain V1-initial firmware-band fallback to users#721
gijzelaerr wants to merge 1 commit intomasterfrom
doc-v1-initial-limitation

Conversation

@gijzelaerr
Copy link
Copy Markdown
Owner

Summary

  • Replace the generic PLC did not provide ServerSessionVersion warning with an actionable message that tells users which firmware band hit this case (V1-initial S7-1200, FW < 4.5), what the impact is (db_read/db_write still work, browse() won't), and where to follow the limitation (S7-1200 Session Setup Incomplete #710).

Why

The V1-initial S7-1200 firmware band sends a Struct(314) value for ServerSessionVersion instead of a scalar. Master only handles the scalar case, so the setup-echo can't run, the PLC drops the connection, and the unified Client transparently falls back to legacy PUT/GET. The fall-through is correct, but the previous log line gave users no way to tell whether it was a bug, a network issue, or just an unsupported firmware band.

This is the cheap-but-honest path forward chosen in lieu of porting the proprietary HarpoS7-style SessionKey handshake. The full research artefacts live on research/harpo-port-incomplete for whoever picks that up later.

Refs #710.

Test plan

  • test_s7_unit.py and test_s7_v2.py still pass (97 passed, 6 skipped).
  • mypy + ruff clean on s7/connection.py.

🤖 Generated with Claude Code

When a real V1-initial S7-1200 (FW < 4.5) sends Struct(314) for
ServerSessionVersion instead of a scalar, our session-setup echo
can't run, the PLC drops the connection, and the unified Client
falls back to legacy PUT/GET. The previous warning ("PLC did not
provide ServerSessionVersion") was generic enough that users
couldn't tell whether it was a bug, a network issue, or an
unsupported firmware band.

Replace with an actionable message: explains the firmware band,
points at issue #710, and tells users explicitly that db_read /
db_write still work but browse() will not.

Refs #710.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant