The table on the next page lists the six message types used in the MTP protocol. The Message ID is the “tag” of the MTP packet. Message types with ID numbers in the 0 to 127 range are messages types sent from the MP 700 Series GPS to the host application. Those with Message ID numbers in the 128 to
Tag 1 byte
Length
2 bytes Message payload(variable length) (Message ID) Length 2 bytes Field (variable Field ID 1 byte length) Length 2 bytes Field (variable Field ID 1 byte length)
...
MTP message255 range are message types sent from the host application to the MP 700 Series GPS. This section provides the information required to parse those message types.
Table 9-1: MTP message types
Message type Message ID
Description MT_SUM_REG_IND 0x00 Unsolicited summary/
registration information
This is the message in which GPS and digital input data from the modem is sent. It is sent at regular intervals based on the low rate, fast rate, and gps timers discussed on page 47. It is also sent on the occurrence of certain events, as shown in the table on page 64.
MT_CONF_RSP 0x01 Response to configuration
This message is sent from the modem in response to MT_CONF_REQ. It indicates whether the configuration attempt was successful.
MT_SUM_RSP 0x02 Response to summary
This message has the same format as
MT_SUM_REG_IND but is only sent in response to MT_SUM_REQ.
MT_CONF_REQ 0x80 Configuration request
This message is used to configure the report rate, device name, and server IP address, for a particular engine. This message can also be used to send TAIP commands to the GPS module and to edit the initialization strings of the modem.
Using the Monitoring and Tracking Protocol
Rev 2.0 Oct.04 59
The next tables specify the fields within each message type. The Field ID is the code that must precede the length and contents of the field when the MTP packets are assembled.
MT_SUM_REQ 0x81 Request summary
This message triggers the modem to send
MT_SUM_REG_IND for a particular engine.
MT_ALM_RST_IND 0x82 Latched alarm reset
This resets a digital input alarm and de-activates the fast rate timer. See “Alarm acknowledgement” on page 65.
Table 9-1: MTP message types
Message type Message ID
Description
Table 9-2: MT_SUM_REG_IND (Unsolicited Summary / Registration Info) and MT_SUM_RSP (Response to Summary Request)
Field Field ID
Description Contents MT_SR_ENGINE_ID 0x00 Engine ID. One byte:
• 0—Engine 1
• 1—Engine 2
• 2—Engine 3
• 3—Engine 4
MT_SR_MP_NAME 0x01 Device name (set using Watcher or the
MT_CONF_REQ message)
Variable length buffer (maximum 24 bytes) in Unicode format.
MT_SR_GPS_TAIP 0x02 If the GPS module is configured for TAIP, this field contains one or more concatenated TAIP messages.
Variable length buffer.
MT_SR_GPS_NMEA 0x03 If the GPS module is configured for NMEA, this field contains one or more concatenated NMEA messages. (These may be of the type GGA, VTG, or both.)
MT_SR_RSSI_MEAS 0x04 Current RSSI measurement in dBm (decibels relative to one milliwatt).
Two byte signed int16.
MT_SR_IO_STATUS 0x05 Digital input, alarm, battery, and ignition status.
Four bytes:
• Byte 1—external digital input status.
Bits 0 to 3 correspond to binary inputs 0 to 3. For each bit, 1 is “High” and 0 is “Low”.
Bits 4 to 7 are reserved.
• Byte 2—alarm status.
Bits 0 to 3 correspond to binary inputs 0 to 3. For each bit, 1 indicates that the alarm is on and 0 indicates that the alarm is off. Bits 4 to 7 correspond to binary inputs 0 to 3. These bits toggle when the alarm state switches between “Idle” and “Latched and Active”. See “Alarm acknowl- edgement” on page 65.
• Byte 3—battery status. 0x00—battery not low 0x01—battery low
• Byte 4—ignition sense status. 0—ignition is on
>0—ignition is off
Table 9-3: MT_CONF_RSP (Response to Configuration Request)
Field Field ID
Description Contents MT_CRSP_ENGINE_ID 0x00 Engine ID. One byte:
• 0—Engine 1
• 1—Engine 2
• 2—Engine 3
• 3—Engine 4
Table 9-2: MT_SUM_REG_IND (Unsolicited Summary / Registration Info) and MT_SUM_RSP (Response to Summary Request)
Field Field ID
Using the Monitoring and Tracking Protocol
Rev 2.0 Oct.04 61
MT_CRSP_RESP_CODE 0x01 Response code. One byte:
• 0—OK
• 1—Error
MT_CRSP_RESP_STRG 0x02 Response string. Variable length ASCII string providing a plain text description of the error condition, if applicable. NULL termination is not required as the tag length indicates the length of the string.
Table 9-3: MT_CONF_RSP (Response to Configuration Request)
Field Field ID
Description Contents
Table 9-4: MT_CONF_REQ (Configuration Request)
Field Field ID
Description Contents MT_CREQ_ENGINE_ID 0x00 Engine ID. One byte:
• 0—Engine 1
• 1—Engine 2
• 2—Engine 3
• 3—Engine 4
MT_CREQ_MP_NAME 0x01 Device name (set using Watcher or the
MT_CONF_REQ message). (Optional).
Variable length buffer (maximum 24 bytes) in unicode format.
MT_CREQ_CONN_TYPE 0x02 Connection type. (Optional). One byte:
• 0—engine is disabled.
• 1—UDP.
• 2—TCP (not currently supported).
Any other value represents a configuration error.
MT_CREQ_SERVER_IPV4 0x03 Server IP address. (Optional).
Four bytes, with each byte in the range 0 to 255.
MT_CREQ_SERVER_PORT 0x04 Server port number. (Optional).
Two byte port number.
MT_CREQ_LOW_RATE 0x05 Low reporting rate. See “Report frequency timers” on page 47. (Optional).
One byte:
• 0—disabled
• 1 to 255—low rate in minutes. The default is 3.
MT_CREQ_FAST_RATE 0x06 Fast reporting rate. See “Report frequency timers” on page 47. (Optional).
One byte:
• 0—disabled.
• 2 to 30—fast rate in seconds. (The default is 3.)
Any other value (including 1) represents a configuration error.
MT_CREQ_GPS_RATE 0x07 GPS polling rate. (Optional). One byte:
• 1 to 255—Sets the GPS polling rate in seconds. This sets the minimum interval between MT_SUM_REG_IND messages. (The default is 10.)
• 0—The
MT_SUM_REG_IND message is sent based on the GPS module configuration.
If the rate is set to 0, reporting is “GPS driven”, otherwise the reporting is “polled”. See “Report frequency timers” on page 47.
MT_CREQ_GPS_CONF 0x08 GPS configuration. (Optional).
Variable length buffer. The content of this field is any valid TAIP message, relayed directly to the GPS module of the MP 700 Series GPS. Note that the contents of this field are ignored by the GPS module if the module is configured for NMEA.
MT_CREQ_GPS_INIT1 0x09 GPS initialization string 1. (Optional).
Variable length buffer. The content of this tag is any valid TAIP message, issued to the GPS module during MP startup. See “Report
frequency timers” on page 47.
MT_CREQ_GPS_INIT2 0x0A GPS initialization string 2. (Optional).
Same as
MT_CREQ_GPS_INIT1.
Table 9-4: MT_CONF_REQ (Configuration Request)
Field Field ID
Using the Monitoring and Tracking Protocol
Rev 2.0 Oct.04 63
MT_CREQ_GPS_INIT4 0x0C GPS initialization string 4. (Optional).
Same as
MT_CREQ_GPS_INIT1.
MT_CREQ_GPS_INIT5 0x0D GPS initialization string 5. (Optional).
Same as
MT_CREQ_GPS_INIT1.
Table 9-4: MT_CONF_REQ (Configuration Request)
Field Field ID
Description Contents
Table 9-5: MT_SUM_REQ (Request Summary)
Field Field ID
Description Contents MT_SREQ_ENGINE_ID 0x00 Engine ID. One byte:
• 0—Engine 1
• 1—Engine 2
• 2—Engine 3
• 3—Engine 4
Table 9-6: MT_ALM_RST_IND (Latched Alarm Reset)
Field Field ID
Description Contents MT_ARI_ENGINE_ID 0x00 Engine ID. One byte:
• 0—Engine 1
• 1—Engine 2
• 2—Engine 3
• 3—Engine 4
MT_ARI_DIO_ALM_ACK 0x01 Digital input alarm acknowledgement.
One byte:
• Bits 0 to 3—correspond to binary inputs 0 to 3. For each bit, “1” indicates an alarm reset, and “0” indicates no action.
• Bits 4 to 7—correspond to binary inputs 0 to 3. These bits are copied from Byte 2, Bits 4 to 7 of the MT_SR_IO_STATUS field of the
MT_SUM_REG_IND message. (See page 59.)
frequency
When the MP 700 Series GPS has a GPRS/EDGE connection to the network, it sends the summary/registration message (MT_SUM_REG_IND) to the host application at regular intervals, as well as on the occurrence of specific events. This message contains an engine ID, the device name, GPS data in the form of either a TAIP or NMEA message, the RSSI value, and the status of the digital input ports.
The interval at which the MT_SUM_REG_IND message is regularly sent is governed by three timers: the low rate timer, the fast rate timer, and the GPS timer. These are discussed in the section “Report frequency timers” on page 47.
As well as occurring at intervals based on the timer settings, the MT_SUM_REG_IND message is triggered by the events listed in the following table: