From ddf75b987262a586e3252be119533bd979893bae Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 16 Mar 2017 11:02:05 +0000 Subject: [PATCH] Remove sensitivity to the state of DSR (DTR on the modem). --- SerialController.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/SerialController.cpp b/SerialController.cpp index fba80ae..67310c8 100644 --- a/SerialController.cpp +++ b/SerialController.cpp @@ -75,17 +75,18 @@ bool CSerialController::open() return false; } - dcb.BaudRate = DWORD(m_speed); - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.fParity = FALSE; - dcb.StopBits = ONESTOPBIT; - dcb.fInX = FALSE; - dcb.fOutX = FALSE; - dcb.fOutxCtsFlow = FALSE; - dcb.fOutxDsrFlow = FALSE; - dcb.fDtrControl = DTR_CONTROL_DISABLE; - dcb.fRtsControl = RTS_CONTROL_DISABLE; + dcb.BaudRate = DWORD(m_speed); + dcb.ByteSize = 8; + dcb.Parity = NOPARITY; + dcb.fParity = FALSE; + dcb.StopBits = ONESTOPBIT; + dcb.fInX = FALSE; + dcb.fOutX = FALSE; + dcb.fOutxCtsFlow = FALSE; + dcb.fOutxDsrFlow = FALSE; + dcb.fDsrSensitivity = FALSE; + dcb.fDtrControl = DTR_CONTROL_DISABLE; + dcb.fRtsControl = RTS_CONTROL_DISABLE; if (::SetCommState(m_handle, &dcb) == 0) { LogError("Cannot set the attributes for %s, err=%04lx", m_device.c_str(), ::GetLastError());