Skip to content

Commit c2d3c78

Browse files
authored
Workaround for critical Rpi udev bug affecting serial ports (#583)
1 parent 1bb52e9 commit c2d3c78

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: sources/leddevice/dev_serial/EspTools.h

+11
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ class EspTools
6464
_rs232Port.setRequestToSend(true);
6565
_rs232Port.setRequestToSend(false);
6666
}
67+
else if (serialPortInfo.productIdentifier() == 0x3483 && serialPortInfo.vendorIdentifier() == 0x1106)
68+
{
69+
Warning(_log, "Enabling the Rpi4 udev bug workaround. The serial device is incorrectly identified by the OS and HyperHDR skips the reset. State: %i, %i",
70+
_rs232Port.isDataTerminalReady(), _rs232Port.isRequestToSend());
71+
72+
_rs232Port.write((char*)comBuffer, sizeof(comBuffer));
73+
74+
_rs232Port.setDataTerminalReady(true);
75+
_rs232Port.setRequestToSend(true);
76+
_rs232Port.setRequestToSend(false);
77+
}
6778
else
6879
{
6980
// reset to defaults

0 commit comments

Comments
 (0)