Skip to content

fix: use the real PI services _GARB and _MODU for compress and copy RAM to ROM - #941

Merged
gijzelaerr merged 1 commit into
masterfrom
fix-pi-service-names
Oct 7, 2026
Merged

gijzelaerr merged 1 commit into
masterfrom
fix-pi-service-names

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Fixes #936.

build_compress_request and build_copy_ram_to_rom_request used an invented PI service _MSZL (with file id P for copy RAM to ROM). The public CISA snap7.pcap trace, which the cold start and stop requests already match byte for byte, shows engineering tools sending:

  • compress: 28 00 00 00 00 00 00 fd 00 00 05 5f 47 41 52 42 (_GARB)
  • copy RAM to ROM: 28 00 00 00 00 00 00 fd 00 02 45 50 05 5f 4d 4f 44 55 (file system EP, _MODU)

and native Snap7's TReqFunCompress / TReqFunCopyRamToRom use the same names. Both requests are now defined next to the start/stop parameter blocks and built through build_plc_control_request (new operations compress and copy_ram_to_rom). The bundled server recognises the new services instead of _MSZL, and tests pin the exact parameter bytes from the capture.

I have not tested against a physical PLC; this aligns the packets with the captured real jobs.

@gijzelaerr
gijzelaerr force-pushed the fix-pi-service-names branch from 87918e7 to 5b08876 Compare October 7, 2026 10:13
@gijzelaerr
gijzelaerr merged commit 571dc7a into master Oct 7, 2026
20 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.

Compress and copy-RAM-to-ROM use PI service _MSZL; real jobs and native Snap7 use _GARB and _MODU

1 participant