I am using GPSTools and BlueTools to connect to a GPS.
Steps I am using are
Connect to stream (device.stream)
Using ReadCallBack routines as per Find and Connect example and passing the result to Gpstools inbuilt Nmeaparser using nmeaparser.parse and then reacting to the events raised eg OnFIX.
The setup works really well (Albeit I sometimes get Connection Failed - Unknown error which I wish I could be more informed about) but to make the application robust I need to automate(from users perspective) reconnection if stream is lost.
I notice that GPStools used in conjunction with any existing PC onboard Bluetooth software apppears to automatically initiate a re-connect if stream(device) is lost.
I wish to replicate this behaviour in the GPSTools/Bluetools environment.
My question is which events best describe the type of loss egDeviceLost and how do I automate the recovery for each.
Do I need to restart all the discovery events or do I need to simply try to re-connect to the steam vis stream.begin read statement using the previously identified Device/service detail which I stored within global variables (ie gpsdevice as remote_device and GPsservice as remote_service).