Repository navigation
feat: add RFC2217 network serial transport support - #450
Open
ChristophKomenda wants to merge 1 commit into
Open
ChristophKomenda wants to merge 1 commit into
ChristophKomenda wants to merge 1 commit into
Conversation
ChristophKomenda
marked this pull request as ready for review
November 25, 2026 19:31
This was referenced Nov 25, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This draft introduces RFC2217 network serial transport support for Inkcut, allowing serial and USB-connected vinyl cutters to be operated over a network.
Motivation
Inkcut uses
serial.serial_for_url(), but its existing serial transport assumes non-blocking write timeouts and file-descriptor-based I/O. On real RFC2217 hardware, initialization failed with:Changes
Hardware validation
flowchart TD A[Browser / noVNC] --> B[Inkcut on Raspberry Pi 5] B -->|RFC2217| C[ser2net on Raspberry Pi 5] C -->|USB / CH340| D[Refine EH-1351]A physical pen plot of a calibration SVG containing a 20 x 20 mm square, a 14 mm diameter circle and a 6 x 6 mm crosshair succeeded. The contours appeared closed, with correct pen-up/down movements and approximate dimensional agreement. This is preliminary validation, not precision calibration or a cutting test. Photos are available separately.
Automated tests
The new tests cover initialization, write ordering, incoming data, write exceptions, incomplete writes and graceful shutdown. The full suite was run against an isolated snapshot of the proposed changes:
Compatibility and security
The separate transport path is intended to minimize impact on existing local serial devices; direct local serial regression testing remains outstanding. HPGL, DMPL and GPGL implementations are unchanged. RFC2217 has no native authentication or encryption; use trusted networks or secured tunnels.
Remaining work
This draft is for early technical feedback, not production deployment.
The dedicated Refine profile and headless Raspberry Pi documentation are intentionally excluded and will be proposed separately.
Feedback on transport architecture and lifecycle management is welcome.