Skip to content
This repository was archived by the owner on Nov 15, 2026. It is now read-only.

feat: default port 5020 and Modbus RTU on a virtual serial port, release 2.0.0a12 (SIM-07, SIM-04) - #37

Merged
gavinying merged 5 commits into
v2from
sim-07-default-port
Nov 13, 2026
Merged

gavinying merged 5 commits into
v2from
sim-07-default-port

Conversation

@gavinying

Copy link
Copy Markdown
Collaborator

Summary

  • SIM-07: without --port, modsim listens on 5020 (TCP, UDP and TLS) so the first command needs no administrator rights. --port 502 still selects the standard port.
  • SIM-04: --serial pty simulates a Modbus RTU device without hardware on Linux and macOS. Two pseudo-terminal pairs are joined by a byte bridge; modsim prints the client port and the matching modpoll --serial ... command and removes the port on exit. --serial PORT listens on an existing port, --serial-link PATH adds a fixed symbolic link. The model runtime now serves RTU as well as TCP.
  • pyserial becomes a dependency: --comm serial could not start from a clean install before.
  • Release 2.0.0a12.

Verification

  • uv run pytest: 153 passed, 5 skipped.
  • New tests/test_virtual_serial.py starts modsim --config ... --serial pty and reads the model twice over the virtual port.
  • Read end to end with the modpoll CLI over the virtual port on Linux. macOS and Windows are not verified.

🤖 Generated with Claude Code

gavinying and others added 5 commits November 13, 2026 21:56
The first command no longer needs administrator rights. TCP, UDP and TLS
share the default; port 502 stays available with --port 502.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
--serial pty joins two pseudo-terminal pairs with a byte bridge so modpoll can
read a model-driven device without hardware; --serial PORT listens on an
existing port. pyserial becomes a dependency.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…TCP one

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@gavinying gavinying changed the title feat!: default port 5020 and Modbus RTU on a virtual serial port, release 2.0.0a12 (SIM-07, SIM-04) feat: default port 5020 and Modbus RTU on a virtual serial port, release 2.0.0a12 (SIM-07, SIM-04) Nov 13, 2026
@gavinying
gavinying merged commit 32b29ab into v2 Nov 13, 2026
11 checks passed
@gavinying
gavinying deleted the sim-07-default-port branch November 13, 2026 15:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant