I need to send and receive data from a AD101B board by rs232 serial port to my own c# application. So I made a trace to the suplier application. I obtained the data connection, baud rate, parity, stopbyte, etc.
SerialPort port = new SerialPort();
port.PortName = p_strPortName; //COM1
port.BaudRate = p_uBaudRate; //9600
port.DataBits = p_uDataBits; //8
port.StopBits = StopBits.One; //1
port.Parity = Parity.None; //None
port.ReadTimeout = p_uReadTimeout; //300
port.WriteTimeout = p_uWriteTimeout; //300
port.Open();
I couldn't set the following values in the SerialPort class
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
ControlHandShake=1
FlowReplace=64
XonLimit=0
XoffLimit=0
I found this topic it was useful, but I cant set the value of FlowReplace or ControlHandShake, because they aren't part of the DCB structure.
If anyone knows how set the HandFlow value in C# or how to establish the connection between AD101B device and C # application it would help me.