30
APPENDIX C: CHANGING THE BAUD RATE IN GARMIN MODE
In certain cases, you may need to change the default baud rate of your Garmin GPS receiver
while in Garmin mode. Follow these steps to temporarily change the baud rate.
Refer to the
Garmin Device Interface Specification
found in the Garmin Device Interface SDK
for
details on how to form and parse Garmin packets, available at
https://www8.garmin.com/support/commProtocol.html
1. Turn off all requests by transmitting packet:
id = IOP_RQST_DATA (0x1C)
data = 0 (16-bit unsigned integer )
2. The GPS unit will respond by sending a packet with id = IOP_ACK_BYTE (0x06)
3. After you receive the above packet, transmit packet:
id = IOP_BAUD_RQST_DATA (0x30)
data = baud rate to change to (32-bit unsigned integer; for example,
38400)
4. The GPS unit will respond by sending a packet:
id = IOP_BAUD_ACPT_DATA (0x31)
data = highest acceptable baud rate closest to what was requested
(32-bit unsigned integer; for example, 38361 decimal)
5. Determine the actual baud rate value from the data sent in step 4. This value will be /-
5% of the actual baud rate. (For example, the GPS unit might send a baud rate of 38361,
which correlates to a baud rate of 38400).
6. If the baud rate in step 5 is acceptable, transmit packet:
id = IOP_ACK_BYTE (0x06)
data = IOP_BAUD_ACPT_DATA (0x31)
7. Sleep for a small amount of time, about 100 milliseconds, to make sure the packet in (6) was
successfully transmitted to the GPS unit.
8. Close the current connection to the GPS unit and immediately open a new connection with
the new baud rate obtained in step 5.
9. Immediately after establishing a connection, transmit packet:
id = IOP_CMND_DATA (0x0A)
data = IOP_ACK_PING (0x3A)
10. The GPS will respond by sending a packet:
id = IOP_ACK_BYTE (0x06)
data = IOP_CMND_DATA (0x0A)
11. After you receive the above packet, transmit the same packet in step 9 again.
id = IOP_CMND_DATA (0x0A)
data = IOP_ACK_PING (0x3A)
12. The GPS will respond again with the same packet in step 10.
id = IOP_ACK_BYTE (0x06)
data = IOP_CMND_DATA (0x0A)
13. The baud rate has been successfully changed upon receiving the above packet. If the GPS
unit does not receive these two IOP_CMND_DATA packets within two seconds, it will reset
its baud rate to 9600.