| Keith Sheppard 2006-09-29, 10:33 am |
| I'm having a spot of bother with comms in MapMan which only seems to happen
when connected to a Garmin Forerunner GPS unit. If you're familiar with
Garmin protocols you'll know (and if you aren't, then it's probably not a
lot of use you reading this posting) that when you request something like
tracks data the device responds with an initial PID_Records packet which
specifies the number of data packets it intends to send. This is followed
by the data packets themselves then a transfer complete packet.
My comms code is working fine with devices such as eTrex C(x) but with the
Forerunner I am regularly receiving fewer data packets than the number
specified in the initial PID_Records packet. Often significantly fewer.
For example, I have a trace of a Forerunner session in which my application
requests track data and the device responds with a PID_Records packet with a
count of 19,661. This is followed by a track header packet and just 801
track data packets (ie. 802 packets in all) before I get a transfer complete
packet.
The MapMan user who reported the problem says he thinks that some of the
expected track information is missing. I also observe that the track
segment numbers (Forerunner assigns a unique number to each track segment)
have gaps in them, as if whole segments have been missed out.
Anyone any ideas what is going on here? I find it difficult to believe that
I am missing incoming data packets because my comms works fine for othe
Garmin USB devices. I would find it easier to believe if it were just the
occasional lost packet but look at the figures. The number of packets
received is less than five percent of the number expected. I cannot believe
that my comms code is so bad that I am missing more than 95 percent of the
incoming data.
Any suggestions as to what might be causing the discrepancy gratefully
received.
Keith
|