Skip to content

SerialPort.setBreak() consistently takes ~510ms to finish #588

Open

Description

@moritzruth

I'm using jSerialComm to interact with a USB-to-DMX adapter. The following code used to work in v2.10.2 and earlier versions:

while (Thread.currentThread().isAlive) {
	port.setBreak()
	Thread.sleep(0, 88000)
	port.clearBreak()
	Thread.sleep(0, 8000)
	stream.write(0)
	stream.write(data)
	stream.flush()
	Thread.sleep(23)
}

Starting with v2.10.3, the port.setBreak() call always takes between 509 and 512 milliseconds to complete, compared to less than one millisecond in the versions before. (Measured using measureTimeMillis from Kotlin's standard library.)

While the DMX protocol generally does not require very precise timing, ~500ms is definitely too long.

Activity

  1. hedgecrw commented on Oct 31, 2025

    @hedgecrw
    Contributor

    What OS is this on? Are you certain that it's the setBreak() function that is being delayed? I'm asking because there are literally no code changes to the setBreak functionality between v2.10.2 and v2.10.3 (or even between v2.10.2 and the current version).

  2. moritzruth commented on Jan 17, 2026

    @moritzruth
    Author

    Hey, I apologize for not responding sooner.

    It will probably be some time before I return to the project where I encountered this problem, if ever. It seems like I was the only person with the problem, so feel free to close this issue.

    Now, to answer the first part of your question: It was on Void Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions