kdb294: Windows applications using BlueHeat/Net sometime fails Win32 serial communication API

Title: Windows applications using BlueHeat/Net sometime fails Win32 serial communication API
Date: July 8, 2004
KDB: KDB-294
Revision: 0.00
Author: JMK
Distribution: External

Symptoms

  • Windows application occasionally fails on the call to SetCommTimeouts(…) (or any other API)
  • GetLastError returns a 995 “The I/O operation has been aborted because of either a thread exit or an application request.”

Cause/Solution

Your application may be setting the variable dcb.fAbortOnError =1. If there are any errors in the data stream all requests will be cancelled and that’s why SetCommTimeOut() fails. You have to set dcb.fAbortOnError = 0, then no request will be cancelled by the driver.

Another possible cause is that the firmware opens the port with some default settings and if the device sends data at that time then there will be a few errors until host the driver sends the current line settings. This error can be minimized by changing the ‘Basic Serial Settings’ in the WCM to that of the settings used by the device which sends the data.

End of KDB-294

Go to Top