Skip to content

Commit e449ced

Browse files
author
Marco Fagiolini
committed
Add a fix for the lack of a direct RTS line control under windows
When using the stock USB ACM driver (USBSER.SYS), IOCTLs that set/reset the state of the RTS line are silently ignored. A known workaround is to set the desired RTS state and then set DTR's state. https://answers.microsoft.com/en-us/windows/forum/all/virtual-serial-port-usbsersys-is-not-sending/a086cbf6-2d0a-4c46-88fd-73865bc185f5
1 parent 667f1c9 commit e449ced

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- ser_win32.c.orig 2019-01-18 23:15:50.355141672 +0100
2+
+++ ser_win32.c 2019-01-18 23:16:00.271207164 +0100
3+
@@ -328,11 +328,11 @@
4+
HANDLE hComPort=(HANDLE)fd->pfd;
5+
6+
if (is_on) {
7+
- EscapeCommFunction(hComPort, SETDTR);
8+
EscapeCommFunction(hComPort, SETRTS);
9+
+ EscapeCommFunction(hComPort, SETDTR);
10+
} else {
11+
- EscapeCommFunction(hComPort, CLRDTR);
12+
EscapeCommFunction(hComPort, CLRRTS);
13+
+ EscapeCommFunction(hComPort, CLRDTR);
14+
}
15+
return 0;
16+
}

0 commit comments

Comments
 (0)