I'm trying to debug a serial interface. I'm using a serial port monitor to watch the port as another program opens it and initializes the interface. I'm having trouble figuring out all the settings represented by IOCTL_SERIAL_GET_HANDFLOW. Does anyone know where that is documented? I've figured out some of it from ntddser.h, but it doesn't completely describe the whole set of values. I know that the first byte and fifth byte from my value below, 0x01 and 0x40, are DTR control enabled and RTS control enabled (maybe not in that order though) because I can set my dcb.fDtrControl and dcb.fRtsControl to be enabled and see those change from 0x00 and 0x00 to the 0x01 and 0x40 shown below. But I don't know what the two 0x80 values and the 0x70 and 0x1C represent.
01 00 00 80 40 00 00 80 00 70 00 00 00 1C 00 00
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Through trial and error I think I figured it out. The first 80 is from setting fAbortOnError, the second from fTXContinueOnXoff. The 00 70 00 00 and 00 1C 00 00 are XonLim and XoffLim, representing size limits of 0x7000 and 0x1C00 bytes (the order is reversed). I still haven't found a good source of documentation for this stuff, but at least my code does the right thing now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-11-18
IOCTL_SERIAL_GET_HANDFLOW fills a SERIAL_HANDFLOW structure. The definitive source for Windows API documentation is MSDN:
But you are right in that there appears to be no specific documentation for the SERIAL_HANDFLOW structure itself. Anyhow, I have tracked down exactly what you were looking for; would you believe by Googling "SERIAL_HANDFLOW"! ;-)
The first hit should lead you to this: www.ekf.de/c/ccom/drv_i960/ekf960mle.pdf . Although it is the user manual for a CompactPCI industrial I/O controller, it does in fact describe thh structure in the most minute detail on page 17.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to debug a serial interface. I'm using a serial port monitor to watch the port as another program opens it and initializes the interface. I'm having trouble figuring out all the settings represented by IOCTL_SERIAL_GET_HANDFLOW. Does anyone know where that is documented? I've figured out some of it from ntddser.h, but it doesn't completely describe the whole set of values. I know that the first byte and fifth byte from my value below, 0x01 and 0x40, are DTR control enabled and RTS control enabled (maybe not in that order though) because I can set my dcb.fDtrControl and dcb.fRtsControl to be enabled and see those change from 0x00 and 0x00 to the 0x01 and 0x40 shown below. But I don't know what the two 0x80 values and the 0x70 and 0x1C represent.
01 00 00 80 40 00 00 80 00 70 00 00 00 1C 00 00
Through trial and error I think I figured it out. The first 80 is from setting fAbortOnError, the second from fTXContinueOnXoff. The 00 70 00 00 and 00 1C 00 00 are XonLim and XoffLim, representing size limits of 0x7000 and 0x1C00 bytes (the order is reversed). I still haven't found a good source of documentation for this stuff, but at least my code does the right thing now.
IOCTL_SERIAL_GET_HANDFLOW fills a SERIAL_HANDFLOW structure. The definitive source for Windows API documentation is MSDN:
http://msdn2.microsoft.com/en-us/library/ms801095.aspx
But you are right in that there appears to be no specific documentation for the SERIAL_HANDFLOW structure itself. Anyhow, I have tracked down exactly what you were looking for; would you believe by Googling "SERIAL_HANDFLOW"! ;-)
The first hit should lead you to this: www.ekf.de/c/ccom/drv_i960/ekf960mle.pdf . Although it is the user manual for a CompactPCI industrial I/O controller, it does in fact describe thh structure in the most minute detail on page 17.
Clifford
Thanks Clifford, that confirms my trial and error findings. I'm surprised that MSDN doesn't have a description like the one on page 17 of that doc.
... so was I.