I'm able to use Franson Serial Tools to successfully read & write almost all the time. I'm using the PDA to write to a Bluetooth device. However, if the Bluetooth device goes out of range, the program hangs after attempting to Write to the Serial Port. Is there a way to trigger a timeout or cause Franson to return with some error code? Here's what I'm doing:
objPort.LicenseKey = xxxx
objPort.BaudRate = 460800
objPort.ComPort = 8
objPort.NoEvents = True
objPort.BufferSize = 8
objPort.Purge True, True
objPort.Enabled = True
objPort.TimeOut = 5000
'At this point if the device moves out of range
StrOut = objPort.Write("Hello") 'The program just hangs here
MsgBox "Return to the program" 'This never executes!
MsgBox "Does this show?" 'This never executes either!
Thanks, in advance, for your help.