Skip to content

Commit 7a39d8d

Browse files
authored
drivers: nhs_ser: do not force CRTSCTS (breaks CDC-ACM and 3-wire serial)
Forcing CRTSCTS in openfd() blocks communication on NHS UPSes whose port has no hardware flow-control lines: USB/CDC-ACM virtual ports (e.g. /dev/ttyACM0) and the official NHS 3-wire RS-232 cable (DB9 pins 2/3/5 only, no RTS/CTS). The driver opens the port but never assembles a packet. Disabling CRTSCTS restores communication.
1 parent e308c36 commit 7a39d8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nhs_ser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static int openfd(const char * portarg, int BAUDRATE) {
595595
tty.c_cflag |= CS8; /* 8 bits per byte */
596596

597597
/* CTS / RTS */
598-
tty.c_cflag |= CRTSCTS; /* Enable hardware flow control */
598+
tty.c_cflag &= ~CRTSCTS; /* NHS serial / CDC-ACM has no RTS/CTS flow control */
599599

600600
/* Enable Read and disable modem control */
601601
/* // tty.c_cflag |= (CLOCAL | CREAD); */

0 commit comments

Comments
 (0)