Does anyone know how to set DSR and DCD high or low in windows? It seems windows only provides the facility to retrieve like GetCommModemStatus but not setting these two flags.
Thanks very much!
Printable View
Does anyone know how to set DSR and DCD high or low in windows? It seems windows only provides the facility to retrieve like GetCommModemStatus but not setting these two flags.
Thanks very much!
2 seconds of Google. Windows has more than 1 RS232 function. Communications Functions.
Check out the EscapeCommFunction() function in the platform SDK.
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/devio/base/escapecommfunction.htm
Thanks for quick response. Escape function only does RTS and DTR but not DCD or DSR. Also, I cant find any function in Communications Functions will do.
See pinout chart here: http://en.wikipedia.org/wiki/RS-232#Pinouts
In the "Origin" column, the "DTE" is the PC and "DCE" is whatever your PC is connected to. If there isn't a dot under the "DTE" column, then that pin is read-only.
gg