I've got a serial port connection between a PC and an OpenVMS system. The serial port from the PC goes into a DEC-Server. Data comes across as straight ASCII.
I want to send ASCII text across the serial port and receive the ASCII responses.
I am using CreateFile to open the port which works fine.
I am using GetCommMask and SetCommMask to get and set the port setting which works fine.
I am using GetCommTimeouts and SetCommTimeouts to get and set the port timeouts which works fine.
I am using WriteFile to send data to the port which appears to be working fine.
I am using ReadFile to read data... This is where I'm having trouble. I just want to send some data, put the thread to sleep a second or two, then read the response. All I am getting is nothing or an echo of what I sent.
Any ideas?
I want to send ASCII text across the serial port and receive the ASCII responses.
I am using CreateFile to open the port which works fine.
I am using GetCommMask and SetCommMask to get and set the port setting which works fine.
I am using GetCommTimeouts and SetCommTimeouts to get and set the port timeouts which works fine.
I am using WriteFile to send data to the port which appears to be working fine.
I am using ReadFile to read data... This is where I'm having trouble. I just want to send some data, put the thread to sleep a second or two, then read the response. All I am getting is nothing or an echo of what I sent.
Any ideas?