Repository navigation
Serial transport - #54
Merged
Merged
Conversation
dnp3c can connect to the DUT over a serial port instead of TCP, for every procedure of every revision: serial.enabled, with serial.port and the character format (serial.baudRate, serial.dataBits, serial.parity, serial.stopBits). It uses jSerialComm (Apache-2.0 or LGPL-3.0). - SerialChannel reads with a timeout and writes everything it's given; it can assert RTS, and SerialSettings gives a character's bits on the line, for the timed tests to come. - A port the bench can't open, or one that isn't set, is a BenchException, which aborts the run as a harness failure; LocalBindException is one too. - There's no packet capture over serial. - 3.1r1's 6.6.2-4 (No Inter-frame Gap), which is for serial, runs over serial too, sending the confirm to another device's address. - A choice option type, for serial.parity. The tests run the channel over a pair of pseudo-terminals that a Python script joins, where the host has them.
This was referenced Oct 14, 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.
dnp3c can now connect to the device over a serial port instead of TCP, for every procedure of every revision. Set
serial.enabledandserial.port; the character format is set byserial.baudRate,serial.dataBits,serial.parityandserial.stopBits. It uses jSerialComm 2.11.4, which is licensed Apache-2.0 or LGPL-3.0. Its native libraries are kept in the CLI jar.SerialChannelreads against a deadline, in slices of 0.1 to 1 s, because jSerialComm rounds timeouts to tenths of a second and wraps those above 25.5 s on Linux. A write that makes no progress for 5 s fails.SerialSettingscomputes a character's bits on the line. The timed serial tests (8.12) will use both.BenchException. That aborts the run as a harness failure instead of failing the device.LocalBindExceptionis now aBenchExceptiontoo.choice, forserial.parity.The tests run the channel over two pseudo-terminals that a Python script joins. They're skipped on hosts without Python 3 or ptys.
The 2.7
-describeoutput is unchanged.