direwolf icon indicating copy to clipboard operation
direwolf copied to clipboard

Added handling of serial port DCB for Windows

Open pe-jot opened this issue 3 years ago • 0 comments

fixes #315

On Windows systems, it seems to depend on the driver resp. serial port hardware if a simple call of EscapeCommFunction() is enough. If the fDtrControl or fRtsControl in the DCB is in the wrong state, it may fail to set it as desired. see https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb#members

Furthermore, I've tried to simplify the Linux version which allows to directly set/clear the bits with the ioctl() function, according to https://linux.die.net/man/4/tty_ioctl

pe-jot avatar Feb 23 '21 15:02 pe-jot