CLACom FAQ's - Lock Ups


You no doubt have Hardware Flow Control (CTS/RTS) turned On (this is the default when calling SetPort).

The "Lock-Up" you are experiencing is the Windows Communications Driver waiting for the Clear To Send (CTS) Line to become active. This is occurring at the Device Driver level, not in the CLACom Library.

If the Device doesn't use Hardware Handshaking (CTS/RTS) you can turn that off by using either SetPortEx() or making a call to SetFlowControl() after calling SetPort(). You can also check the Modem Status line after you call SetPort() and InitPort() to determine if the device is attached and/or powered on.

Example:

! This has to be done after calling
! InitPort().
! This assumes that the device supports
! the CTS Line. If it doesn't, then you
! shouldn't be using CTS/RTS Flow Control.
modstat BYTE
modstat = ModemStat(ComPort)
If BAND(modstat, 010h) NOT= 010h
   ! Device is not hooked up or is not
   ! powered on. Display a message and
   ! tell user about situation. Don't
   ! send any data as Windows will hang
End

It is up to the Application/Programmer to determine if a device is attached and/or turned on. CLACom cannot do this for you since it only talks to Serial Ports, not devices that are attached to those ports.

The ModemInstalled Template Procedure is provided so that you may check to see if a Modem (or other Device that uses CTS Handshaking) is attached and powered on. The GTERM sample program shows how to utilize this procedure.