I have a new MacBook Pro running 3.3.1419 that I built using Xcode and wxWidgets 2.9.5. I have 3 Garmins, a 12XL, a GPSmap 76 and a GPSmap 76C. Serial
input and output to all three devices fails on this laptop
. The read for ACK after writing a command packet gets a NAK packet instead of the ACK. The Garmin
spec. mentions that this might happen if the host is slow retrieving the ACK packet, it doesn't mention what happens if the read occurs too quickly. The spec. says that the operation should be retried with the appropriate retry and timeout logic. The GARMINHOST code doesn't check or handle NAKs as far as I can tell. It treats all link level problems as framing errors and gives up.
A quick fix is to insert a 5 millisec delay "usleep(5000)" at the end of GPS_Serial_Write_Packet just before the normal return. This quick hack results in correct position updates and route
writes to the Garmin
on a serial
line. The proper fix is probably handling the NAK packet correctly, something I'll continue to look at.
There's also an issue with the 12XL. It's very old and is one of those Garmins that must be checked for route
and waypoint overwrite. The logic is there to read the routes from the GPS
checking for duplicates and then writing the new route back. The GARMINHOST logic works for the first 9 routes and then fails. I haven't investigated this further but did notice that the code assumes the unit has 10 routes when in fact the 12XL has 20.