Amateur radio, programming, electronics and other musings

TSIP Packet Structure

TSIP Packet Structure

TSIP stands for Trimble Standard Interface Protocol, and it is used in products from Trimble such as the Thunderbolt and differs from NMEA which is a lot simpler and only contains status data.

The TSIP protocol is based on the transmission of packets of information between the user equipment and the GPS receiver. Each packet includes an identification code that identifies the meaning and format of the data that follows. Each packet begins and ends with control characters.

TSIP packet structure is the same for both commands and reports. The packet format is:

<DLE> <id> <data string bytes> <DLE> <ETX>

Where:

  • <DLE> is the byte 0x10
  • <ETX> is the byte 0x03
  • <id> is a packet identifier byte, which can have any value excepting <ETX> and <DLE>.

The bytes in the data string can have any value. To prevent confusion with the frame sequences <DLE> <id> and <DLE> <ETX>, every <DLE> byte in the data string is preceded by an extra <DLE> byte (‘stuffing’). These extra <DLE> bytes must be added (‘stuffed’) before sending a packet and removed after receiving the packet. Notice that a simple <DLE> <ETX> sequence does not necessarily signify the end of the packet, as these can be bytes in the middle of a data string. The end of a packet is <ETX> preceded by an odd number of <DLE> bytes.

Multiple-byte numbers (integer, float, and double) follow the ANSI / IEEE Std. 754 IEEE Standard for binary Floating-Point Arithmetic. They are sent most-significant byte first. Note that switching the byte order will be required in Intel-based machines. The data types used in the ThunderBolt TSIP are defined below.

  • UINT8 – An 8 bit unsigned integer (0 to 255).
  • INT8 – An 8 bit signed integer (-128 to 127).
  • UINT16 – A 16 bit unsigned integer (0 to 65,535).
  • INT16 – A 16 bit signed integer (-32,768 to 32,767).
  • UINT32 – A 32 bit unsigned integer (0 to 4,294,967,295)
  • INT32 – A 32 bit signed integer (-2,147,483,648 to 2,147,483,647).
  • Single — Float (4 bytes) (3.4×10-38 to 1.7×1038) (24 bit precision)
  • Double —Float (8 bytes) (1.7×10-308 to 3.4×10308) (53 bit precision)

An example packet:

0x10, 
0x8F, 0xAB, 
0x00, 0x03, 0xE5, 0x1F, 0x06, 0x88, 0x00, 0x00, 
0x0C, 0x17, 0x36, 0x16, 0x18, 0x01, 0x07, 0xDC,
0x10, 0x03

Your challenge is to decode this (hint: it is a timing packet).  I will post more about the breakdown of this kind of packet in the next post.