mscomm32 can't read from hub4com
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
There's this emulator http://www.elexol.nl/en/products/espa-tool-uk which's built on VB6 and is using the mscomm32 library for serial io. When it's connected to a simple com0com pair, all is fine, but if this pair is part of a hub4com hub, the 'receive' event is never raised, even when I send just one byte. Other apps can read form this hub without problems.
I was able to reproduce the issue in the custom .VBS script: https://gist.github.com/basinilya/16fd6137ca6809268e869ae3ea634890
My com0com configuration:
COM7 <-> CNCB7 COM8 <-> CNCB8
Buffer overrun enabled. My hub.bat:
hub4com --create-filter=trace --route=All:All --add-filters=All:trace \\.\CNCB7 \\.\CNCB8
The reader script connects to COM8. The writer app connects to COM7. The trace suggests that hub4com is writing something:
2018/07/30 19:46:28.963 CNCB7(0)-(trace)->: MSG_LINE_DATA {[1]: 04 * . *} 2018/07/30 19:46:28.978 CNCB8(1)<-(trace)-CNCB7(0): MSG_LINE_DATA {[1]: 04 * . *}
I observe that WriteOverlapped::OnWrite is delayed until the mscomm32 reader disconnects and another reader connects to the other side of the pair.
Same problem applies to the commercial Eltima driver 9.0. When hub4com is on the other side of the pair, Putty can read, but mscomm32 can't.
Last edit: Ilya Basin 2018-07-31
The problem was solved by adding the "--octs=off" command line option. For some reason MSComm can't receive events when the handshake is on.