This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Repository navigation
feat: listen on Modbus port 502 by default (SIM-03) - #28
Merged
Merged
Conversation
Default the listener to the standard Modbus port (502 for TCP and UDP, 802 for Modbus/TLS) so modpoll reaches a local simulator without --tcp-port. When the operating system reserves the port, fail before starting and explain how to rerun with sudo or pick a port above 1023. Managed deployments keep their explicit server port. BREAKING CHANGE: modsim without --port now listens on 502 instead of 5020; pass --port 5020 to keep the previous port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--configis then reachable withmodpoll --tcp 127.0.0.1, without--tcp-port.sudo "$(command -v uvx)" …(plainsudo uvxusually cannot find uvx), or pass--port 5020and point the client at it.server.port; only the single-process CLI default changes.Platform behavior
127.0.0.1:502ip_unprivileged_port_startis 1024 by default); verified locally0.0.0.0; reports show binding only127.0.0.1still needs rootBreaking change
modsimwithout--portnow listens on 502 instead of 5020. Pass--port 5020to keep the previous port. The ModioHub website keeps its commands on 5020 until this ships in a release, then drops--tcp-portfrom the local read command.Tests
make check: lint, types and dependency checks pass.make test: 114 passed, 2 skipped, including new tests for the 502 default, the privileged-port message, and a real non-root Linux bind to 502.uv run --group docs mkdocs build -spasses.Part of SIM-03 in the ModioHub master plan.
🤖 Generated with Claude Code