Skip to content

Assert DTR when opening Adalight and Ardulight serial ports (#545) - #662

Open
psieg wants to merge 2 commits into
masterfrom
fix/545-serial-dtr
Open

psieg wants to merge 2 commits into
masterfrom
fix/545-serial-dtr

Conversation

@psieg

@psieg psieg commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Fixes #545

Summary

  • Assert DTR (setDataTerminalReady(true)) after setDataBits(QSerialPort::Data8) succeeds in LedDeviceAdalight::open() and LedDeviceArdulight::open(), so CDC / ESP8266 serial devices see the terminal as ready.
  • If setDataTerminalReady(true) returns false (for example on virtual serial ports without modem control line support), log a qWarning() including the port name, error code, and errorString() without failing open().
  • Add LedDeviceManagerTest::testSerialDevicesOpenDtrBehavior covering failed opens on nonexistent ports and non-fatal DTR warnings plus packet transmission over Linux PTY virtual serial ports.

Testing

  • Built Prismatik and LightpackTests with qmake6 -r && make -j2.
  • Executed QT_QPA_PLATFORM=offscreen ./bin/LightpackTests: all 8 test suites passed (0 failed, 0 skipped), including all 17 tests in LedDeviceManagerTest.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When serial port is opened DTR line stays low.

1 participant