# DO107 Protocol

# Introduction

The DO107 devices use the GPRS and TCP/IP protocol to connect to the server.This device aggregates the data according to its configuration, then it connects to the server whose address is specified in the its configuration and transmits the data to the server. The DO107 uses the Protocol Buffer 3 to transfer data between the server and the device. Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages .

For more info, see Google protocol buffers.

DO107 protocol buffers is defined in the Messages.proto and Config.proto files.To compile the protocol buffer definition in the programming language, install protoc and it run with the "--[language name]_out" parameter which is set to the directory you want to have output.

**Example1 : compile defined protocol to Go code **

protoc --go_out=. *.proto

  • # Device Data Packet

    In this document, Device Packet is a data packet that device sends to server. this packet consists 2 main parts : header and data that shown in image1.

    # Image1: Parts of device packet

    The first part of each device packet is the header that has fixed items and length. The fields of header described in Table 1

    # Table 1: The header fields of device packet

    SN offset Name Size(bytes) Type ‫‪Description‬‬
    1 0 Protocol head 2 Uint16 The firs tow bytes of each data packet transmitted between the server and the device must be included the 0xABAB code
    2 2 TID(Transaction ID) 4 Uint32-LittleEndian In the Device Packets, TID is an incremental number. In response to a server request, the TID is the same as the server packet TID.
    3 6 API version 2 Uint16-BigEndian API version that the device sends data to server.
    4 8 Flag 2 Uint16-BigEndian Each bit of flag has meaning:
    • if bit 0 of the flag is set to 1, it means that the block of message data compressed with lz4 algorithm. More info
    5 10 Message Type 2 Uint16-LittleEndian ID of Message Types that defined in protocol
    6 12 IMEI 8 Uint64-LittleEndian -
    7 20 DataLength 4 Uint32-LittleEndian The length of the message data
    8 24 Reserved 4 Uint32-LittleEndian Reserved bytes for serial port error detection. Should be 0.

    # 2. Data

    The data section of each device packet is serialized and compressed message that the device wants to send according to the message type specified in the header.

    Example 2 : Device Packet

    Bytes of data packet :
    ababe0380000000100000100292f0b86c70e03003b000000000000000a390dad04ff4115ae7559421d00909a4435cd8c2f43452976b45c48015a0b0a0b1e3233343536374664620f000000f4c70200ab5d00bc2400006d
    Head: 0xabab
    TID: 0xe0380000 = 14560
    API version: 0x0001= 1
    Flag: 0x0000= 0
    Message Type: 0x0100= 1 = DataPack_Request
    IMEI: 0x292f0b86c70e0300= 860675040292649 D
    DataLength: 0x3b000000= 59
    ReservedBytes: 0x00000000= 0
    Data :
    0x0a390dad04ff4115ae7559421d00909a4435cd8c2f43452976b45c48015a0b0a0b1e3233343536374664620f000000f4c70200ab5d00bc2400006d

  • # Server Data Packet

    In this document, Server Packet, is a data packet that server sends to device. A server packet that the DO107 device expect received from server, has 2 parts: header and data that shown in image2 and described in Table 2

    # Image2: Parts of server packet

    # Header

    The header of a server packet contains 8 fields. The fields are described in Table 2

    # Table 2: Header of Server Packet

    SN offset Name Size(bytes) Type ‫‪Description‬‬
    1 0 Protocol head 2 Uint16 Explained in protocol head of device packet
    2 2 TID(Transaction ID) 4 Uint32-LittleEndian In server packets, the TID number can be either an incremental number, or the TID of the device packet (which the server must respond to the device request with the same TID).
    3 6 Flag 2 Uint16-BigEndian Explained in flag of device packet
    4 8 Message Type 2 Uint16-LittleEndian ID of Message Types that server can send
    5 10 DataLength 4 Uint32-LittleEndian The length of the message data
    6 14 Reserved 4 Uint32-LittleEndian Reserved bytes for serial port error detection. Should be 0.

    # 2. Data

    The data in this part is a message data related to the message type that specified in header of the server packet..

    Example 3 : Server Packet

    Bytes of data packet : ababe00600000000020002000000000000000801
    Head: 0xabab
    TID: 0xe0060000 = 1760
    Flag: 0x0000= 0
    Message Type: 0x0200= 2 = DataPack_Response
    DataLength: 0x 02000000= 2
    ReservedBytes: 0x00000000= 0
    Data : 0x0801

# DO107 Message Types

In DO107 Protocol, message types divided into 5 categories. These categories are General, Config, Firmware, Connection and OBD message types. These are briefly described in Table3.

# Table3 - Message Types

ID Type ‫Sender ‪Description‬‬
0 Timeout - Reserved for embedded system
1 DataPack_Request Device Send data of point
2 DataPack_Response Server Respond to the DataPack_Request
7 Authentication_Request Device Authentication request from device
8 Authentication_Response Server Respond to the Authentication_Request
9 OnlinePosition_Request Device Online positioning data point
10 Config_Set_Request Server Setting a new configuration
11 Config_Set_Response Device Respond to Config_Set_Request
12 Config_Get_Request Server Get configuration from device
13 Config_Get_Response Device Send device configuration to server
14 Config_Diff_Request Server Setting diff configuration
15 Config_Diff_Response Device Respond to Config_Diff_Request
16 Config_SSLSetCertificate_Request Server Setting SSL certificate for communicate with server.
17 Config_SSLSetCertificate_Response Device Respond to Config_SSLSetCertificate_Request
18 Config_SSLGetStatus_Request Server Get status of SSL settings from device
19 Config_SSLGetStatus_Response Device Send status of SSL settings to server
20 Firmware_Info_Request Server Get the current firmware information
21 Firmware_Info_Response Device Respond to Firmware_Info_Request
22 Firmware_Update_Start_Request Server Send a firmware update request to device
23 Firmware_Update_Start_Response Device Respond to Firmware_Update_Start_Request
24 Firmware_GetPack_Request Device Request slice of the firmware from server
25 Firmware_GetPack_Response Server Send slice of firmware file to device
26 Firmware_Update_State Device Send update status of device's firmware to server
30 Ping Server
31 Pong Device
32 Log_Start Server Request send logs to configurator application from device
33 Log_End Server Request ending to send logs from device
34 Log_Pack Device Send device logs to server
60 Command_Request Server Request command (just like SMS commands) to the device
61 Command_Response Device Command response
61 FMS_DataLog_Data Device FMS Log data
110 DiagnosticsTroubleCodes_SaveCodes_Request Device Device will send DTC codes with this message type
111 DiagnosticsTroubleCodes_SaveCodes_Response Server Response to the device DTC codes message

# Data Messages

  • # DataPack_Request :

    This message type is used to send point data to the server in the structure of DataPackRequest message. DataPackRequest message contains one or more DataPoint messages. This type of message is used to send point data to the server in the structure of the DataPackRequest.

    # DataPackRequest

    message DataPackRequest {
         repeated DataPoint Points = 1;
    }
    

    DataPoint message includes GRPS and IOs data that collected by the device. Fields of This message described in Table 3

    # DataPoint

    message DataPoint {
        float Latitude = 1;
        float Longitude = 2;
        float Altitude = 3;
        uint32 Satellites = 4;
        float Speed = 5;
        float Bearing = 6;
        uint32 HDOP = 7;
        fixed32 Timestamp = 8;
        Configs.AlarmType Alarm = 9;
        repeated Configs.AlarmType IOList_ID = 11;
        repeated uint64 IOList_Value = 12;
    }
    

    # Table 3 : DataPoint Fields

    Field Name Type Description
    Latitude float Geo-Width in ‫‪DDD.dddd‬‬ format
    Longitude float Geo-Height in ‫‪DDD.dddd‬‬ format
    Altitude float The height above sea level of a location (meter)
    Satellites uint32 Count of used GPS satellites for point detection
    Speed float Vehicle speed calculated by GPS(km/h)
    Bearing float Bearing is calculated as an angle measured in degrees in a clockwise direction from true north
    HDOP uint32 Horizontal dilution of precision (GPS system)
    Timestamp fixed32 Time of picked point in unix time system
    Alarm Configs.AlarmType Alarm that happened in picked point. list of Alarms Defined in Table 7
    IOList_ID Array of AlarmType AlarmType IDs of IOs
    IOList_Value Array of uint64 The values of each alarm listed in the IOList_ID
  • # DataPack_Response :

    The server must respond to the DataPack_Request with a device packet which type of message is DataPack_Response. The server TID must be the same as the TID of the device packet. The data part of this response is a DataPackResponse message that contains a DataPackResponseCode. The server chooses an DataPackResponseCode based on the result of processing the data.

    If server response is "DataPack_OK", the device erases the data of DataPack_Request packet from its memory, otherwise, it will be kept the packet and resend it within the specified time interval in the device configuration.

    # DataPackResponse

    message DataPackResponse {
        DataPackResponseCode Response = 1;
    }
    

    # DataPackResponseCode

    enum DataPackResponseCode {
        DataPack_Timeout = 0;
        DataPack_OK = 1;
        DataPack_UnknownError = 2;
        DataPack_Decode_Error = 3;
    }
    

# Authentication

There is two authentication method for devices on the server-side. IMEI mode and AuthenticaionCode mode. it can be set in the configuration. In AuthenticationCode mode after any connection to the server, the device first sends an Authentication_Reuqest message with a key to the server and waits for the response from the server, If server responds to it with the valid state then the device continues its connection data sending otherwise the device close the connection and try again after some configurable seconds

  • # Authentication_Request

    message AuthenticateRequest {
    	string Code = 1;
    }
    
  • # Authentication_Response

    enum AuthenticateResponseCode {
    	Authenticate_Invalid = 0;
    	Authenticate_Valid = 1;
    }
    
    message AuthenticateResponse {
    	AuthenticateResponseCode Code = 1;
    }
    

# Online Position

There is an ability in the device to send online position data to the server after receiving onlinepos command. With onlinepos command, the user can make the device send its position in a specific time and interval. The device will send its position data to the server with OnlinePosition_Request message type

  • # OnlinePosition_Request

    For each online position data point the device will send this message type with DataPoint message in its payload.

# Config Message Types

  • # Config_Set_Request :

    For changing settings of the device configuration, the server must send a packet with Config_Set_Request message type. Data part of this packet contains ConfigSetRequest message that described in Table 4. To set the configuration, there is no need to set the password field by default, but if the Config password is set in the previous configuration, password filed of ConfigSetRequest message must be set.

    # ConfigSetRequest

    message ConfigSetRequest {
    string Password = 1;
    Configs.Config Configuration = 2;
    }
    

    # Table 4 : ConfigSetRequest

    ID Field Name Type Description
    1 Password String The password is set in config message
    2 Configuration Configs.Config This filed contains a config Message fields
  • # Config_Set_Response :

    The device responds with this message type to Config_Set_Request .The data part of this response is the ConfigResponseCode message, which is the result of setting configuration on the device.

    # ConfigSetResponse

    message ConfigSetResponse {
        ConfigResponseCode Response = 1;
    }
    

    # ConfigResponseCode

    enum ConfigResponseCode {
        OK = 0;
        Unknown_Error = 1;		/* Config error - from device */
        Protocol_Error = 2;		/* Config message protocol error - from device */
        Store_Error = 3;		/* Config store error - from device */
        Wrong_Password = 4;		/* Configuration password is wrong */
    }
    
  • # Config_Get_Request :

    The server must send a packet with Config_Get_Request message type and set password in ConfigGetRequest message (if password is required).

    # ConfigGetRequest

    message ConfigGetRequest {
         string Password = 1;
    }
    
  • # Config_Get_Response :

    The device responds with this message type to Config_Get_Request . Data of Config_Get_Response packet is a ConfigGetResponse message,Table 5.

    # ConfigGetResponse

    message ConfigGetResponse {
        ConfigResponseCode Response = 1;
        Configs.Config Data = 2;
    }
    

    # Table 5 : ConfigGetResponse

    ID Field Name Type Description
    1 Response ConfigResponseCode The result of requesting the current configuration of the device.
    2 Data Configs.Config This filed contains the current configuration of the device.
  • # Config_Diff_Request :

    If you need to reset the values of some of the Config fields, you can use this message type. Message of the request will be ConfigDiffRequest.

    # ConfigDiffRequest

    message ConfigDiffRequest {
        string Password = 1;
        Configs.ConfigDiff ConfigDiff = 2;
    }
    
    message ConfigDiff {
        repeated Uint32DiffItem Uint32DiffItems = 1;
        repeated Int32DiffItem Int32DiffItems = 2;
        repeated Uint64DiffItem Uint64DiffItems = 3;
        repeated Int64DiffItem Int64DiffItems = 4;
        repeated FloatDiffItem  FloatDiffItems = 5;
        repeated StringDiffItem  StringDiffItems = 6;
        repeated BoolDiffItem  BoolDiffItems = 7;
        repeated FloatArrayDiffItem  FloatArrayDiffItems = 8;
    }
    
    message Uint32DiffItem {
    	uint32 Tag = 1;
        uint32 Value = 2;
    }
    
    message Int32DiffItem {
    	uint32 Tag = 1;
        int32 Value = 2;
    }
    
    message Uint64DiffItem {
    	uint32 Tag = 1;
        uint64 Value = 2;
    }
    
    message Int64DiffItem {
    	uint32 Tag = 1;
        uint64 Value = 2;
    }
    
    message FloatDiffItem {
    	uint32 Tag = 1;
        float Value = 2;
    }
    
    message BoolDiffItem {
    	uint32 Tag = 1;
        bool Value = 2;
    }
    
    message StringDiffItem {
    	uint32 Tag = 1;
        string Value = 2;
    }
    
  • # Config_Diff_Response :

    The server responds to Config_Diff_Request with a server packet that has the Config_Diff_Response message type and the ConfigSetResponse message.

  • # Config_SSLSetCertificate_Request :

    To communicate securely with the server, the device can be configured to obtain SSL connection to the server. In order to set SSL required certificates Config_SSLSetCertificate_Request for setting server security certificate, SSL client security certificate and client private key on the device can be sent through Configuration App. So it can only configured using configuration app through SerialPort and Bluetooth

    ID Field Name Type Description
    1 SSL_CertificateType Depending on the type of certificate that will be uploaded, a type of SSL_CertificateType will be selected
    2 FileData array of bytes Bytes of certificate file

    # SSL_SetCertificate

    message SSL_SetCertificate {
        SSL_CertificateType Type = 1;
        bytes FileData = 2;
    }
    

    # SSL_CertificateType

    enum SSL_CertificateType {
        ClearAll = 0;
        Server1_CA = 1;
        Server2_CA = 2;
        Client_Certificate = 3;
        Client_Key = 4;
    }
    
  • # Config_SSLSetCertificate_Response:

    In response to Config_SSLSetCertificate_Request, the device sends packet with Config_SSLSetCertificate_Response message type.The message in this packet indicates the status of the uploaded certificate.

    ID Field Name Type Description
    1 Type SSL_CertificateType Based on the type of uploaded certificate, the device responds with the same type
    2 Status SSL_CertificateStatus Certificate uploading status
    3 CRC uint32 -

    # SSL_SetCertificateResponse

    message SSL_SetCertificateResponse {
       SSL_CertificateType Type = 1;
       SSL_CertificateStatus Status = 2;
       uint32 CRC = 3;
    }
    

    # SSL_CertificateStatus

    enum SSL_CertificateStatus {
        Certificate_Unknown = 0;
        Certificate_Valid = 1;
        Certificate_Unavailable = 2;
        Certificate_Error = 3;
    }
    
  • # Config_SSLGetStatus_Request :

    This type of message is used to get the status of SSL certificates on the device.

  • # Config_SSLGetStatus_Response :

    The device sends the status of SSL certificates to the server, in message SSL_Status.

    # SSL_Status

    message SSL_Status {
        SSL_CertificateStatus Server1_CA_Status = 1;
        uint32 Server1_CA_CRC = 2;
    
        SSL_CertificateStatus Server2_CA_Status = 3;
        uint32 Server2_CA_CRC = 4;
    
        SSL_CertificateStatus Client_Certificate_Status = 5;
        uint32 Client_Certificate_CRC = 6;
    
        SSL_CertificateStatus Client_Key_Status = 7;
        uint32 Client_Key_CRC = 8;
    }
    
    ID Field Name Type Description
    1 Server1_CA_Status SSL_CertificateStatus Current status of SSL certificate of the server 1
    2 Server1_CA_CRC uint32
    3 Server2_CA_Status SSL_CertificateStatus Current status of SSL certificate of the server 2
    4 Server2_CA_CRC uint32
    5 Client_Certificate_Status SSL_CertificateStatus Current status of SSL certificate of the device
    6 Client_Certificate_CRC uint32
    7 Client_Key_Status SSL_CertificateStatus Current status of private client key
    8 Client_Key_CRC uint32

# Firmware Message Types

This section describes how to update a Dolphin device firmware. The image3 shows the update process.

# Image3: Firmware Update Activity Diagram

  • # Firmware_Info_Request :

    This type of message is used to know the version of the firmware on the device. The server packet whose message type is Firmware_Info_Request does not require a data part.

  • # Firmware_Info_Response :

    In response to Firmware_Info_Request, the device sends a data packet that has a message type of Firmware_Info_Response and data of FirmwareInfo message.

    # FirmwareInfo

    message FirmwareInfo {
      uint32 Major = 1;
      uint32 Minor = 2;
    }
    
  • # Firmware_Update_Start_Request :

    The server sends a message of this type to device for starting update the firmware. To update firmware ,the device sends FUStartData message that has a server firmware id and size of firmware file, if size of firmware has a true value, the device responses with FirmwareUpdateResp message and Firmware_Update_Start_Response message type.

    # FUStartData

    message FUStartData {
       // Firmware ID
       uint32 FirmwareID = 1;
       // Firmware file total size in bytes
       uint32 TotalSize = 2;
    }
    
  • # Firmware_Update_Start_Response :

    The device responses to Firmware_Update_Start_Request with F FURespCodes . If the device be able to update the firmware and the file in correct size, the device will respond with FU_UPDATE_START_OK, otherwise it will FU_UPDATE_START_ERROR or FU_UPDATE_START_ERROR_SIZE. After the device receives the correct update start request ,It will request the slice of the firmware file from the server.

    # FirmwareUpdateResp

    message  FirmwareUpdateResp {
    uint32 FirmwareID = 1;
    FURespCode Response = 2;
    }
    

    # FURespCode

    enum FURespCode {
    	FU_NONE = 0;						// Reserved for embedded system
    
    	FU_UPDATE_START_OK = 1;
    	FU_UPDATE_START_ERROR = 2;
    	FU_UPDATE_START_ERROR_SIZE = 3;
    
    	FU_GETPACK_OK = 4;
    	FU_GETPACK_ERROR = 5;
    
    	FU_UPDATE_STATE_INSTALLING = 6;
    	FU_UPDATE_STATE_FINISHED = 7;
    	FU_UPDATE_STATE_ERROR = 8;
    	FU_UPDATE_STATE_ERROR_INVALID = 9;
    	FU_UPDATE_STATE_ERROR_CRC = 10;
    }
    
  • # Firmware_GetPack_Request :

    To receive the firmware file from the server, the device must send a packet with the Firmware_GetPack_Request message type after receiving Firmware_Update_Start_Request, and in this message, it will mark the start and end of the bytes of the file (FUPackRequest). If the device fails to receive a slice of file, the request must resend the to the server.

    # FUPackRequest

    message FUPackRequest {
    	uint32 FirmwareID = 1;
    	uint32 Start = 2;
    	uint32 End = 3;
    }
    
  • # Firmware_GetPack_Response :

    In response to a request for a slice of the firmware file as byte, the server sends a packet containing ofthe response code, the start and end of the bytes of the file. if the server is able to respond to the device request (based on the FirmwareID and start and end indexes of file bytes), it will send the FU_GETPACK_OK code, or it will respond with the FU_GETPACK_ERROR code. So,device based on the server response, will continue or finish the firmware updating process.

    message FUPacket {
    	uint32 FirmwareID = 1;
    	FURespCode Response = 2;
    	uint32 Start = 3;
    	uint32 End = 4;
    	bytes Data = 5;
    }
    
  • # Firmware_Update_State :

    This message type of Firmware_Update_State is used to declare the status of the firmware update to the server. When the device receives all the bytes of the firmware file and starts the process of updating the firmware, it will specify its status in the FirmwareUpdateResp message and sends the message to server. The status can be one of the following codes::

    • FU_UPDATE_STATE_INSTALLING: If the device receives correctly all the bytes of the firmware file, it will send FU_UPDATE_STATE_INSTALLING code to server.
    • FU_UPDATE_STATE_FINISHED: If the device updates successfully its firmware, it will send this code.
    • FU_UPDATE_STATE_ERROR : If there is a unknown error, when installing the new firmware, the device will send FU_UPDATE_STATE_ERROR code to server.
    • FU_UPDATE_STATE_ERROR_INVALID : If file is invalid, this code will be used.
    • FU_UPDATE_STATE_ERROR_CRC : The device check CRC of file before start the installation. if CRC isn't true, sends FU_UPDATE_STATE_ERROR_CRC code to server.

# Connection Message Types

This message types in this category are mostly used for serial connections (such as bluetooth connection).

  • # Ping and Pong Message :

    To ensure serial connection is stable, connection must be check periodically. for this reason, it will use from Ping and Pong message types. A packet with Ping message type ,will has a data part include of serialized bytes of DeviceInfo message that contain of values of device properties,GNSS and GSM status, and real-time values of device IOs. Data part of pong packet will be empty.

    # DeviceInfo Message

    message DeviceInfo {
       string Name = 1;
       fixed64 IMEI = 2;
       string FirmwareVersion = 3;
    
       // System info
       fixed32 RTCTimestamp = 10;
       fixed32 LastStartTimestamp = 11;
       uint32 UpTime = 12;
       uint32 TotalUpTime = 13;
       
       // GNSS
       GNSSStatus GNSS_Status = 20;
       bool GNSS_Fix = 21;
       uint32 GNSS_TimeToFirstFix = 22;
       uint32 GNSS_TimeToLastFix = 23;
       uint32 GNSS_Packets = 25;
       float GNSS_Latitude = 26;
       float GNSS_Longitude = 27;
       uint32 GNSS_Altitude = 28;
       uint32 GNSS_Speed = 29;
       uint32 GNSS_Bearing = 30;
       uint32 GNSS_HDOP = 31;
       uint32 GNSS_PDOP = 32;
       uint32 GNSS_SatsInUse = 33;
       uint32 GNSS_GPSSats = 34;
       uint32 GNSS_GLONASSSats = 35;
       uint32 GNSS_GalileoSats = 36;
       uint32 GNSS_BeidouSats = 37;
    
       // GSM
       ModemStatus GSM_ModemStatus = 50;
       SIMStatus GSM_SIMStatus = 52;
       bool GSM_GPRSStatus = 53;
       string GSM_OperatorName = 54;
       uint32 GSM_OperatorCode = 55;
       uint32 GSM_LocationAreaCode = 56;
       uint32 GSM_CellID = 57;
       uint32 GSM_SignalStrength = 58;
    
       uint32 GSM_Records_SentCount = 60;
       uint32 GSM_Records_LastSentTime = 61;
       uint32 GSM_Records_LastServerResponseTime = 62;
       uint32 GSM_Records_Count = 63;
    
       uint32 GSM_GPRS_SentData = 65;
       uint32 GSM_GPRS_ReceivedData = 66;
       
       uint32 GSM_SMS_Sent = 69;
       uint32 GSM_SMS_Received = 70;
    
       bool GSM_Socket_State = 75;
    
       // Bluetooth
       BluetoothStatus Bluetooth_Status = 80;
       string Bluetooth_Name = 81;
       string Bluetooth_MAC = 82;
       bool Bluetooth_DataLink_ConnectStatus = 83;
       string Bluetooth_DataLink_Name = 84;
       string Bluetooth_DataLink_MAC = 85;
       BluetoothExtDeviceStatus Bluetooth_ExtDevice_Status = 86;
       string Bluetooth_ExtDevice_Name = 87;
       string Bluetooth_ExtDevice_MAC = 88;
       
       // IO
       repeated Configs.AlarmType IOList_ID = 100;
       repeated uint64 IOList_Value = 101;
    }
    
  • # Log_Start and Log_End :

    The server send data packets with Log_Start and Log_End message types to the device,for getting the device log data. The device gathering and sending it's logs in LogPack according log level specified in the server message (LogStart message) . The LogPack is collection of LogMessage that that include of generate log time(UNIX time format), level of log and message of log. The server sends a data packet with the Log_End message type to finish the receiving of LogPack from device.

    # LogStart

    message LogStart {
        LogLevel Level = 1;
    }
    

    # LogLevel

    enum LogLevel {
        LOG_LEVEL_NONE = 0;
        LOG_LEVEL_FATAL = 0x01;
        LOG_LEVEL_ERROR = 0x02;
        LOG_LEVEL_WARN = 0x04;
        LOG_LEVEL_INFO = 0x08;
        LOG_LEVEL_DEBUG = 0x10;
    }
    

    # LogPack

    message LogPack {
        repeated LogMessage Messages = 1;
    }
    

    # LogMessage

    message LogMessage {
    	fixed32 UnixTimestamp = 1;
    	LogLevel Level = 2;
    	string Message = 3;
    }
    
  • # LOG_PACK

    When the device wants to send its logs to the server, it sends a data packet with Log_Pack message type. The data part of packet is serialized bytes of LogPack message.

# Commands

SMS commands also can be requested from server via GPRS by Command_Request message type. The server should send the command string to the device through CommandRequest message and the device will respond to it via CommandResponse message. There is a completer list of SMS/GPRS Commands in this link

# Command_Request

This message should be send from server in order to request command

# CommandRequest

message CommandRequest {
string Command = 1;
}

# Command_Response

This message will be respond to the Command_Request

# CommandResponse

message CommandResponse {
	string Response = 1;
}

# FMS_DataLog_Data

Device will send FMS log data to server by FMSOnlineDataPack message

message FMSOnlineData{
	uint32 ID = 1;
	uint64 data = 2;
}

message FMSOnlineDataPack{
	repeated FMSOnlineData DataList = 1;
	uint32 Timestamp = 2;
}

# Diagnostic Trouble Codes

According to configuration and vehicle connectivity the device can connect to vehicle through the OBD or FMS connection and get vehicle diagnostic trouble codes (DTC) from vehicle ECU. After retrieving DTC codes from vehicle the device will send the codes with DTCRequest message to the server. Also after any changes in DTCs the device send the new codes again, The server should respond to it with DTCResposne message.

# DiagnosticsTroubleCodes_SaveCodes_Request

Device will send DTC codes with this message type. The message protocol is:

  • # DTCRequest

message DTCRequest {
	repeated DTCRecord DTCRecords = 1;
}
  • # DTCRecord

message DTCRecord {
	repeated DTCCode DTCCodes = 1;
	uint32 Timestamp = 2;

	// OBD Lamp status
	bool OBD_MalfunctionIndicatorLamp = 3;

	// FMS Lamp Status
	uint32 FMS_ProtectLamp = 4;
	uint32 FMS_AmberWarningLamp = 5;
	uint32 FMS_RedStopLamp = 6;
	uint32 FMS_MalfunctionIndicatorLamp = 7;

	uint32 FMS_SAELamp1 = 8;
	uint32 FMS_SAELamp2 = 9;
	uint32 FMS_SAELamp3 = 10;
	uint32 FMS_SAELamp4 = 11;
}
ID Field Name Type Description
1 DTCCodes DTCCode List of DTC codes gathered from device ECU
2 Timestamp uint32 Time of change in DTC codes of vehicle
3 OBD_MalfunctionIndicatorLamp bool Status of OBD malfunction indicator lamp (MIL) (Only in OBD connection)
4 FMS_ProtectLamp uint32 FMS ProtectLamp status (Only in FMS connection)
5 FMS_AmberWarningLamp uint32 FMS AmberWarningLamp status (Only in FMS connection)
6 FMS_RedStopLamp uint32 FMS RedStopLamp status (Only in FMS connection)
7 FMS_MalfunctionIndicatorLamp uint32 FMS MalfunctionIndicatorLamp status (Only in FMS connection)
8 FMS_SAELamp1 uint32 FMS SAELamp1 status (Only in FMS connection)
9 FMS_SAELamp2 uint32 FMS SAELamp2 status (Only in FMS connection)
10 FMS_SAELamp3 uint32 FMS SAELamp3 status (Only in FMS connection)
11 FMS_SAELamp4 uint32 FMS SAELamp4 status (Only in FMS connection)
  • # DTCCode

message DTCCode {
	DTCType DTCType = 1;
	uint32 Code = 2;
	uint32 Reason = 3;
	uint32 OccurrenceCount = 4;
	uint32 Source = 5;
}

enum DTCType {
	OBD_STORED_DTC = 0;
	OBD_PENDING_DTC = 1;
	OBD_PERMANENT_DTC = 2;
	FMS_DTC = 3;
	SCANIA_DTC = 4;
}
ID Field Name Type Description
1 DTCType DTCType ِDTC Code type. One of: OBD_STORED_DTC, OBD_PENDING_DTC, OBD_PERMANENT_DTC, FMS_DTC, SCANIA_DTC according to vehicle type and connection (OBD or FMS)
2 Code uint32 DTC Code
3 Reason uint32 DTC reason (Only in FMS)
4 OccurrenceCount uint32 Occurrence count of DTC (Only in FMS)
5 Source uint32 DTC Source

# DiagnosticsTroubleCodes_SaveCodes_Response

After getting DTC codes from device server should respond to it with this message type. if the device get the DTC_RESPONSE_ERROR or DTC_RESPONSE_NONE (default) from server it will send the new DTC changes again until server respond to it with DTC_RESPONSE_OK code.

enum DTCResposneCode {
	DTC_RESPONSE_NONE = 0;
	DTC_RESPONSE_ERROR = 1;
	DTC_RESPONSE_OK = 2;
}

message DTCResposne {
	DTCResposneCode DTCResposneCode = 1;
}

# Config Message

This message is defined in the Config.proto file.

message Config {
	string Password = 99;

	/* Movement */
	MovementSource Movement = 100;
	uint32 MovementSensorSensitivity = 101;

	/* Sleep */
	SleepMode Sleep = 102;
	uint32 SleepTimeout = 103;

	/* Engine state (Ignition) */
	EngineMode EngineOn = 104;

	/* EngineOn conditions */
	bool EngineOn_DIN1 = 105;
	bool EngineOn_DIN2 = 106;
	bool EngineOn_MovementSensor = 107;
	bool EngineOn_PowerSupplyAvailable = 108;
	uint32 EngineOn_GpsSpeed = 109;
	uint32 EngineOn_CanRPM = 110;
	uint32 EngineOn_MinActiveStateDuration = 111;
	ConditionOperator EngineOn_Operator = 112;
	uint32 EngineOn_MovementStartDelay = 113;
	uint32 EngineOn_MovementStopDelay = 114;
	uint32 EngineOn_ExternalVoltage = 115;

	bool LedIndication = 116;

	/* GPS/GNSS Mode */
	GNSSMode GNSS = 117;

	/* Static navigation */
	bool StaticNavigation_Enabled = 118;
	StaticNavigationSource StaticNavigation_Source = 119;

	/* Records saving/sending without time synchronization */
	RecordsMode RecordsSaveAndSendMode = 120;
	TimeSynchronization TimeSynchronization = 121;
	string NTPServer = 122;
	uint32 NTPInterval = 123;

	uint32 Sleep_NoPowerTimeout = 125;

	bool SendPing = 130;

	/* Data acquisition */
	bool TimetableMode = 140;
	bytes TimetableData = 141;

	/* Bluetooth */
	BluetoothMode Bluetooth_RadioMode = 800;
	string Bluetooth_Name = 801;
	string Bluetooth_PIN = 802;
	BluetoothSecurityMode Bluetooth_SecurityMode = 803;
	bool Bluetooth_PowerDownOnSleep = 804;
	
	BluetoothExternalConnectionMode Bluetooth_ExternalConnectionMode = 810;
	string Bluetooth_ExternalDevice_MAC = 811;
	string Bluetooth_ExternalDevice_Name = 812;
	string Bluetooth_ExternalDevice_PIN = 813;

	string Bluetooth_AuthorizedMAC1 = 820;
	string Bluetooth_AuthorizedMAC2 = 821;
	string Bluetooth_AuthorizedMAC3 = 822;
	string Bluetooth_AuthorizedMAC4 = 823;
	string Bluetooth_AuthorizedMAC5 = 824;

	/* Connection ------------ */
	/* APN */
	bool GPRS_ContextEnabled = 2001;
	string GPRS_ApnName = 2002;
	string GPRS_ApnUsername = 2003;
	string GPRS_ApnPassword = 2004;
	bool GPRS_CHAPAuthentication = 2005;

	uint32 GPRS_LinkTimeout = 2006;
	uint32 GPRS_ResponseTimeout = 2007;

	/* Main server configurations */
	string GPRS_ServerAddress = 2008 ;
	uint32 GPRS_ServerPort = 2009;
	ServerProtocol GPRS_ServerProtocol = 2010;

	/* Backup server configurations */
	string GPRS_BackupServerAddress = 2011;
	uint32 GPRS_BackupServerPort = 2012;
	ServerProtocol GPRS_BackupServerProtocol = 2013;

	bool GPRS_SSL_ClientAuthentication = 2020;

	bool GPRS_DataCompression = 2030;

	/* SMS / Call settings */
	bool SMS_DataSending = 3000;
	string SMS_DataSendNumber = 3001;
	string SMS_Password = 3002;
	int32 SMS_EventTimeZone = 3003;

	CallAction Call_IncommingCallAction = 3051;
	bool Call_OutgoingTrigger_DigitalInput1 = 3052;
	bool Call_OutgoingTrigger_CrashEvent = 3053;
	uint32 Call_OutgoingCallNumber = 3054;
	
	/* Authorized numbers */
	string AuthorizedNumber1 = 3100;
	string AuthorizedNumber2 = 3101;
	string AuthorizedNumber3 = 3102;
	string AuthorizedNumber4 = 3103;
	string AuthorizedNumber5 = 3104;
	string AuthorizedNumber6 = 3105;
	string AuthorizedNumber7 = 3106;
	string AuthorizedNumber8 = 3107;
	string AuthorizedNumber9 = 3108;
	string AuthorizedNumber10 = 3109;
	reserved 3110 to 3149;

	string GsmPredefinedNumber1 = 3200;
	string GsmPredefinedNumber2 = 3201;
	string GsmPredefinedNumber3 = 3202;
	string GsmPredefinedNumber4 = 3203;
	string GsmPredefinedNumber5 = 3204;
	string GsmPredefinedNumber6 = 3205;
	string GsmPredefinedNumber7 = 3206;
	string GsmPredefinedNumber8 = 3207;
	string GsmPredefinedNumber9 = 3208;
	string GsmPredefinedNumber10 = 3209;

	string RoamingOperator1 = 5000;
	string RoamingOperator2 = 5001;
	string RoamingOperator3 = 5002;
	string RoamingOperator4 = 5003;
	string RoamingOperator5 = 5004;
	reserved 5005 to 5049;

	string BlackListOperator1 = 5100;
	string BlackListOperator2 = 5101;
	string BlackListOperator3 = 5102;
	string BlackListOperator4 = 5103;
	string BlackListOperator5 = 5104;
	reserved 5105 to 5149;

	/* Data acquisition on Stop mode */
	uint32 DAQ_Stop_Home_MinPeriod = 10000;
	uint32 DAQ_Stop_Home_MinPathDeviation = 10001;

	uint32 DAQ_Stop_Roaming_MinPeriod = 10100;
	uint32 DAQ_Stop_Roaming_MinPathDeviation = 10101;

	uint32 DAQ_Stop_Unknown_MinPeriod = 10200;
	uint32 DAQ_Stop_Unknown_MinPathDeviation = 10201;

	/* Data acquisition on Moving mode */
	uint32 DAQ_Moving_Home_MinPeriod = 10050;
	uint32 DAQ_Moving_Home_MinPathDeviation = 10051;

	uint32 DAQ_Moving_Roaming_MinPeriod = 10150;
	uint32 DAQ_Moving_Roaming_MinPathDeviation = 10151;

	uint32 DAQ_Moving_Unknown_MinPeriod = 10250;
	uint32 DAQ_Moving_Unknown_MinPathDeviation = 10251;

	/* Geofencing */
	GeoZone GeoZone1 = 20000;
	GeoZone GeoZone2 = 20020;
	GeoZone GeoZone3 = 20040;
	GeoZone GeoZone4 = 20060;
	GeoZone GeoZone5 = 20080;
	GeoZone GeoZone6 = 20100;
	GeoZone GeoZone7 = 20120;
	GeoZone GeoZone8 = 20140;
	GeoZone GeoZone9 = 20160;
	GeoZone GeoZone10 = 20180;
	GeoZone GeoZone11 = 20200;
	GeoZone GeoZone12 = 20220;
	GeoZone GeoZone13 = 20240;
	GeoZone GeoZone14 = 20260;
	GeoZone GeoZone15 = 20280;
	GeoZone GeoZone16 = 20300;
	GeoZone GeoZone17 = 20320;
	GeoZone GeoZone18 = 20340;
	GeoZone GeoZone19 = 20360;
	GeoZone GeoZone20 = 20380;
	GeoZone GeoZone21 = 20400;
	GeoZone GeoZone22 = 20420;
	GeoZone GeoZone23 = 20440;
	GeoZone GeoZone24 = 20460;
	GeoZone GeoZone25 = 20480;
	GeoZone GeoZone26 = 20500;
	GeoZone GeoZone27 = 20520;
	GeoZone GeoZone28 = 20540;
	GeoZone GeoZone29 = 20560;
	GeoZone GeoZone30 = 20580;
	GeoZone GeoZone31 = 20600;
	GeoZone GeoZone32 = 20620;
	GeoZone GeoZone33 = 20640;
	GeoZone GeoZone34 = 20660;
	GeoZone GeoZone35 = 20680;
	GeoZone GeoZone36 = 20700;
	GeoZone GeoZone37 = 20720;
	GeoZone GeoZone38 = 20740;
	GeoZone GeoZone39 = 20760;
	GeoZone GeoZone40 = 20780;
	GeoZone GeoZone41 = 20800;
	GeoZone GeoZone42 = 20820;
	GeoZone GeoZone43 = 20840;
	GeoZone GeoZone44 = 20860;
	GeoZone GeoZone45 = 20880;
	GeoZone GeoZone46 = 20900;
	GeoZone GeoZone47 = 20920;
	GeoZone GeoZone48 = 20940;
	GeoZone GeoZone49 = 20960;
	GeoZone GeoZone50 = 20980;
	
	// Features
	
	// Trip
	uint32 Trip_StartSpeed = 28000;
	bool Trip_UseIgnition = 28001;
	uint32 Trip_ParkDetectionTimeout = 28002;

	// Overspeeding
	bool Overspeeding_Enable = 28100;
	uint32 Overspeeding_Limit = 28101;
	uint32 Overspeeding_ActivationSpeed = 28102;
	OverSpeedingDeactivationMode Overspeeding_DeactivationMode = 28103;
	uint32 Overspeeding_DeactivationValue = 28104;

	// Vehicle Speed Sensor
	uint32 SpeedSensor_KmPulseCount = 28150;

	// Driver Registration
	DriverRegistration_Mode DriverRegistration_Mode = 29000;
	DriverRegistration_Authentication DriverRegistration_Authentication = 29001;
	uint32 DriverRegistration_DeregistrationTimeout = 29002;
	DigitalOutputName DriverRegistration_BuzzerDigitalOutput = 29010;
	DigitalOutputName DriverRegistration_ImmobilizerDigitalOutput = 29011;
	bool DriverRegistration_ImmobilizerActiveLow = 29012;

	uint64 DriverRegistration_AuthorizedID1 = 29100;
	uint64 DriverRegistration_AuthorizedID2 = 29101;
	uint64 DriverRegistration_AuthorizedID3 = 29102;
	uint64 DriverRegistration_AuthorizedID4 = 29103;
	uint64 DriverRegistration_AuthorizedID5 = 29104;
	uint64 DriverRegistration_AuthorizedID6 = 29105;
	uint64 DriverRegistration_AuthorizedID7 = 29106;
	uint64 DriverRegistration_AuthorizedID8 = 29107;
	uint64 DriverRegistration_AuthorizedID9 = 29108;
	uint64 DriverRegistration_AuthorizedID10 = 29109;

	// ECO drive config
	bool ECODriveActive = 30000;
	uint32 ECO_OverSpeedingLimit = 30001;
	uint32 ECO_RPM_GreenBandLowLimit = 30002;
	uint32 ECO_RPM_GreenBandHighLimit = 30003;
	uint32 ECO_HarshBreakingLimit = 30004;
	uint32 ECO_ExtremeBreakingLimit = 30005;
	uint32 ECO_HarshAccelerationLimit = 30006;
	uint32 ECO_CorneringLimit = 30007;
	uint32 ECO_IdlingDelay = 30008;
	uint32 ECO_IdlingSpeed = 30009;
	uint32 ECO_CruiseControlSpeed = 30010;

	bool ECO_CalculateOnlyWhenEngineOn = 30020;
	bool ECO_CustomEngineSource = 30021;
	bool ECO_EngineOn_DIN1 = 30022;
	bool ECO_EngineOn_DIN2 = 30023;
	bool ECO_EngineOn_MovementSensor = 30024;
	bool ECO_EngineOn_PowerSupplyAvailable = 30025;
	uint32 ECO_EngineOn_CanRPM_Low = 30026;
	uint32 ECO_EngineOn_CanRPM_High = 30027;
	ConditionOperator ECO_EngineOn_Operator = 30028;
	uint32 ECO_EngineOn_ExternalVoltage = 30029;

	// OBD
	OBDAdapter OBD_Adapter = 30100;
	
	// Fuel consumption
	FuelType FuelConsumption_FuelType = 30150;
	uint32 FuelConsumption_EngineDisplacement = 30151;
	uint32 FuelConsumption_Cylinders = 30152;
	uint32 FuelConsumption_InjectorPerformance = 30153;
	uint32 FuelConsumption_VolumetricEfficiently = 30154;

	// CANBus (FMS)
	CANBus_ECUType CANBus_ECUType = 30160;
	
	uint32 OBD_FaultCodesReadTime = 30200;

	// SIPAAD
	uint32 SIPAAD_LinkTimeout = 30500;
	uint32 SIPAAD_ResponseTimeout = 30501;

	// SIPAAD server configurations
	string SIPAAD_ServerAddress = 30502;
	uint32 SIPAAD_ServerPort = 30503;
	ServerProtocol SIPAAD_ServerProtocol = 30504;
	bool SIPAAD_SSL_ClientAuthentication = 30505;

	// IO
	IO IO_Time = 50003;
	IO IO_Angle = 50004;
    IO IO_Speed = 50005;

    IO IO_SleepMode = 50008;
	
	IO IO_Ignition = 50010;
	IO IO_Movement = 50011;
	IO IO_DataMode = 50012;
	
	IO IO_GnssStatus = 50020;
	IO IO_GnssHDOP = 50021;
	IO IO_GnssPDOP = 50022;
	IO IO_GnssJammingStatus = 50023;
	reserved 50024;

	IO IO_GsmSignal = 50030;
	IO IO_GsmCellId = 50031;
	IO IO_GsmAreaCode = 50032;
	IO IO_GsmOperator = 50033;
	IO IO_GsmTemperature = 50034;
	IO IO_GsmJammingStatus = 50035;
	
	IO IO_ExternalVoltage = 50040;
	IO IO_BatteryVoltage = 50041;
	IO IO_BatteryCurrent = 50042;

	IO IO_TotalOdometer = 50050;
	IO IO_Odometer = 50051;
	IO IO_EngineOnTime = 50052;
	IO IO_EngineOnTimeDelta = 50053;
	IO IO_IdlingTime = 50054;
	IO IO_IdlingTimeDelta = 50055;

	IO IO_SpeedSensor_Speed = 50060;
	IO IO_SpeedSensor_Distance = 50061;
	IO IO_SpeedSensor_TotalDistance = 50062;
	IO IO_SpeedSensor_MaxSpeed = 50063;
	IO IO_SpeedSensor_GPSSpeedDiff = 50064;
	
	IO IO_DigitalInput1 = 50070;
	IO IO_DigitalInput2 = 50071;
	IO IO_PowerSupply = 50072;

	IO IO_VehicleConnection = 50079;

	IO IO_DigitalInput1Time = 50080;
	IO IO_DigitalInput1TimeDelta = 50081;
	IO IO_DigitalInput2Time = 50082;
	IO IO_DigitalInput2TimeDelta = 50083;
	IO IO_PowerSupplyTime = 50084;
	IO IO_PowerSupplyTimeDelta = 50085;

	IO IO_DigitalOutput1 = 50090;
	IO IO_DigitalOutput2 = 50091;

	IO IO_AnalogInput1 = 50100;
	IO IO_AnalogInput2 = 50101;
	IO IO_AnalogInput3 = 50102;

	IO IO_AxisX = 50110;
	IO IO_AxisY = 50111;
	IO IO_AxisZ = 50112;

	// ECO drive
	IO IO_ECO_MaxSpeed = 50150;
	IO IO_ECO_NormalSpeedDistance = 50151;
	IO IO_ECO_NormalSpeedTotalDistance = 50152;
	IO IO_ECO_NormalSpeedTimer = 50153;
	IO IO_ECO_NormalSpeedTotalTimer = 50154;
	IO IO_ECO_OverSpeedingDistance = 50155;
	IO IO_ECO_OverSpeedingTotalDistance = 50156;
	IO IO_ECO_OverSpeedingTimer = 50157;
	IO IO_ECO_OverSpeedingTotalTimer = 50158;
	
	IO IO_ECO_MaxRPM = 50159;
	IO IO_ECO_RPMGreenBandDistance = 50160;
	IO IO_ECO_RPMGreenBandTotalDistance = 50161;
	IO IO_ECO_RPMGreenBandTimer = 50162;
	IO IO_ECO_RPMGreenBandTotalTimer = 50163;
	IO IO_ECO_RPMRedBandDistance = 50164;
	IO IO_ECO_RPMRedBandTotalDistance = 50165;
	IO IO_ECO_RPMRedBandTimer = 50166;
	IO IO_ECO_RPMRedBandTotalTimer = 50167;

	IO IO_ECO_IdlingEvent = 50170;
	IO IO_ECO_CruiseControlTimer = 50171;
	IO IO_ECO_CruiseControlTotalTimer = 50172;
	IO IO_ECO_CruiseControlDistance = 50173;
	IO IO_ECO_CruiseControlTotalDistance = 50174;

	// ECO Green driving
	IO IO_ECO_BreakCounter = 50180;
	IO IO_ECO_HarshBreakCounter = 50181;
	IO IO_ECO_ExtremeBreakCounter = 50182;
	IO IO_ECO_HarshAccelerationCounter = 50183;
	IO IO_ECO_CorneringCounter = 50184;

	IO IO_ECO_TotalBreak = 50185;
	IO IO_ECO_TotalHarshBreak = 50186;
	IO IO_ECO_TotalExtremeBreak = 50187;
	IO IO_ECO_TotalHarshAcceleration = 50188;
	IO IO_ECO_TotalCornering = 50189;

	reserved 50200 to 50249;

	// Trip
	IO IO_Trip = 50300;
	IO IO_Trip_Time = 50301;
	IO IO_Trip_Distance = 50302;

	// Driver Registration
	IO IO_DriverID = 50350;

	// Sensors
	IO IO_TemperatureSensor1 = 50400;
	IO IO_TemperatureSensor1_ID = 50401;

	IO IO_TemperatureSensor2 = 50402;
	IO IO_TemperatureSensor2_ID = 50403;

	IO IO_TemperatureSensor3 = 50404;
	IO IO_TemperatureSensor3_ID = 50405;

	IO IO_TiltStatus = 50490;

	// OBD
	IO IO_OBD_EngineRPM = 50500;
	IO IO_OBD_BatteryVoltage = 50501;
	IO IO_OBD_EngineCoolantTemperature = 50502;
	IO IO_OBD_VehicleSpeed = 50503;
	IO IO_OBD_TotalDistance = 50504;
	IO IO_OBD_FuelRate = 50505;
	IO IO_OBD_TotalFuelUsed = 50506;
	IO IO_OBD_IntakeAirTemperature = 50507;
	IO IO_OBD_IntakeManifoldAbsolutePressure = 50508;

	/* OBD II Standard */
	IO IO_OBD_MalfunctionIndicatorLamp = 50550;
	IO IO_DiagnosticTroubleCodesCount = 50551;
	IO IO_OBD_CalculatedEngineLoad = 50552;
	IO IO_OBD_MAFAirFlowRate = 50553;
	IO IO_OBD_ThrottlePosition = 50554;
	IO IO_OBD_RunTimeSinceEngineStart = 50555;
	IO IO_OBD_FuelTankLevelInput = 50556;
	IO IO_OBD_DistanceTraveledSinceCodesCleared = 50557;
	IO IO_OBD_AbsoluteThrottlePositionD = 50558;
	IO IO_OBD_TimeRunWithMILOn = 50559;
	IO IO_OBD_EngineOilTemperature = 50560;

	/* CAN Bus */
	IO IO_CANBus_Tachograph1_WorkingState1 = 50700;
	IO IO_CANBus_Tachograph1_WorkingState2 = 50701;
	IO IO_CANBus_Tachograph1_VehicleMotion = 50702;
	IO IO_CANBus_Tachograph1_Driv_1_Time_Rel_States = 50703;
	IO IO_CANBus_Tachograph1_Driver1_Card = 50704;
	IO IO_CANBus_Tachograph1_VehicleOverspeed = 50705;
	IO IO_CANBus_Tachograph1_Driv_2_Time_Rel_States = 50706;
	IO IO_CANBus_Tachograph1_Driver2_Card = 50707;
	IO IO_CANBus_Tachograph1_SystemEvent = 50708;
	IO IO_CANBus_Tachograph1_HandlingInformation = 50709;
	IO IO_CANBus_Tachograph1_TachographPerformance = 50710;
	IO IO_CANBus_Tachograph1_DirectionIndicator = 50711;
	IO IO_CANBus_Tachograph1_VehicleSpeed = 50712;
	IO IO_CANBus_EngineTemperature1_EngineCoolantTemperature = 50713;
	IO IO_CANBus_ElectronicEngineController1_ActualEnginePercent = 50714;
	IO IO_CANBus_ElectronicEngineController1_EngineSpeed = 50715;
	IO IO_CANBus_EngineHours_EngineTotalHours = 50716;
	IO IO_CANBus_VehicleDistance_TotalVehicleDistance = 50717;
	IO IO_CANBus_HighResolutionFuelConsumption_TotalFuelUsed = 50718;
	IO IO_CANBus_DashDisplay_FuelLevel1 = 50719;
	IO IO_CANBus_AmbientConditions_AmbientAirTemperature = 50720;
	IO IO_CANBus_FuelEconomy_FuelRate = 50721;
	IO IO_CANBus_FuelEconomy_InstantaneousFuelEconomy = 50722;
	IO IO_CANBus_AirSupplyPressure_ServiceBrakeAirPressureCircuit_1 = 50723;
	IO IO_CANBus_AirSupplyPressure_ServiceBrakeAirPressureCircuit_2 = 50724;
	IO IO_CANBus_AftertreatmentDieselExhaustFluidTankInformation_Tank1_Level = 50725;
	IO IO_CANBus_TruckBus_ElectronicEngineController2_AcceleratorPedalPosition_1 = 50742;
	IO IO_CANBus_TruckBus_ElectronicEngineController2_EnginePercentLoad = 50743;
	IO IO_CANBus_Truck_VehicleWeight_AxleWeight1 = 50744;
	IO IO_CANBus_Truck_VehicleWeight_AxleWeight2 = 50745;
	IO IO_CANBus_Truck_VehicleWeight_AxleWeight3 = 50746;
	IO IO_CANBus_Truck_ServiceInformation_ServiceDistance = 50747;
	IO IO_CANBus_Truck_PTODriveEngagement_PTOEngageStat = 50748;
	IO IO_CANBus_Truck_CombinationVehicleWeight_GrossCombinationVehicleWeight = 50749;
	IO IO_CANBus_TruckBus_Electronic_Retarder_Controller_1_RetarderTorqueMode = 50750;
	IO IO_CANBus_TruckBus_Electronic_Retarder_Controller_1_RetarderSelection = 50751;
	IO IO_CANBus_Bus_DoorControl1_DoorPosition = 50752;
	IO IO_CANBus_Bus_DoorControl1_RampWheelChairlift = 50753;
	IO IO_CANBus_Bus_DoorControl1_DoorsStatus2 = 50754;
	IO IO_CANBus_Bus_DoorControl2 = 50755;
	IO IO_CANBus_TruckBus_CruiseControl = 50784;
	IO IO_CANBus_Bus_AlternatorSpeed_AlternatorStatus1 = 50785;
	IO IO_CANBus_Bus_AlternatorSpeed_AlternatorStatus2 = 50786;
	IO IO_CANBus_Bus_AlternatorSpeed_AlternatorStatus3 = 50787;
	IO IO_CANBus_Bus_AlternatorSpeed_AlternatorStatus4 = 50788;
	IO IO_CANBus_Bus_ElectronicTransmissionController2_SelectedGear = 50789;
	IO IO_CANBus_Bus_ElectronicTransmissionController2_CurrentGear = 50790;
	IO IO_CANBus_Bus_AirSuspensionControl4_FrontAxleLeft = 50791;
	IO IO_CANBus_Bus_AirSuspensionControl4_FrontAxleRight = 50792;
	IO IO_CANBus_Bus_AirSuspensionControl4_RearAxleLeft = 50793;
	IO IO_CANBus_Bus_AirSuspensionControl4_RearAxleright = 50794;
	IO IO_CANBus_DashDisplay_FuelLevel2 = 50795;
	IO IO_CANBus_ElectronicBrakeController_BrakePedalPosition = 50796;
	IO IO_CANBus_FuelConsumptionGaseous_TotalFuelUsed = 50797;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_ParkingBrakeSwitch = 50798;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_WheelBasedSpeed = 50799;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_CruiseControlActive = 50800;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_BrakeSwitch = 50801;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_ClutchSwitch = 50802;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_PtoState = 50803;
	IO IO_CANBus_TruckBus_CruiseControlVehicleSpeed_CruiseControlStates = 50804;
	IO IO_CANBus_Bus_VehicleElectricalPower_HybridBatteryPackRemainingCharge = 50805;
	IO IO_CANBus_Bus_VehicleDynamicStabilityControl2_SteeringWheelAngle = 50806;
	IO IO_CANBus_ElectronicEngineController14_FuelType = 50807;
	IO IO_CANBus_EngineFluidLevelPressure_EngineOilLevel = 50808;
	IO IO_CANBus_EngineFluidLevelPressure_EngineOilPressure = 50809;
	IO IO_CANBus_EngineFluidLevelPressure_CoolantLevel = 50810;
	IO IO_CANBus_TellTaleStatus = 50811;
	IO IO_CANBus_FuelConsumption_EngineTotalFuelUsed = 50812;
	IO IO_CANBus_Truck_VehicleWeight_AxleWeight4 = 50813;
}

# Table 7 : Alarm Types

Alarm ID Alarm Name
1 Alarm_Normal
3 Alarm_Time
4 Alarm_Angle
5 Alarm_Speed
8 Alarm_SleepMode
9 Alarm_SystemReset
10 Alarm_Ignition
11 Alarm_Movement
12 Alarm_DataMode
20 Alarm_GnssStatus
21 Alarm_GnssHDOP
22 Alarm_GnssPDOP
23 Alarm_GnssJammingStatus
24 Alarm_GnssDataJumping
30 Alarm_GsmSignal
31 Alarm_GsmCellId
32 Alarm_GsmAreaCode
33 Alarm_GsmOperator
34 Alarm_GsmTemperature
35 Alarm_GsmJammingStatus
40 Alarm_ExternalVoltage
41 Alarm_BatteryVoltage
42 Alarm_BatteryCurrent
50 Alarm_TotalOdometer
51 Alarm_Odometer
52 Alarm_EngineOnTime
53 Alarm_EngineOnTimeDelta
54 Alarm_IdlingTime
55 Alarm_IdlingTimeDelta
60 Alarm_SpeedSensor_Speed
61 Alarm_SpeedSensor_Distance
62 Alarm_SpeedSensor_TotalDistance
63 Alarm_SpeedSensor_MaxSpeed
64 Alarm_SpeedSensor_GPSSpeedDiff
70 Alarm_DigitalInput1
71 Alarm_DigitalInput2
72 Alarm_PowerSupply
79 Alarm_VehicleConnection
80 Alarm_DigitalInput1Time
81 Alarm_DigitalInput1TimeDelta
82 Alarm_DigitalInput2Time
83 Alarm_DigitalInput2TimeDelta
84 Alarm_PowerSupplyTime
85 Alarm_PowerSupplyTimeDelta
90 Alarm_DigitalOutput1
91 Alarm_DigitalOutput2
100 Alarm_AnalogInput1
101 Alarm_AnalogInput2
102 Alarm_AnalogInput3
110 Alarm_AxisX
111 Alarm_AxisY
112 Alarm_AxisZ
150 Alarm_ECO_MaxSpeed
151 Alarm_ECO_NormalSpeedDistance
152 Alarm_ECO_NormalSpeedTotalDistance
153 Alarm_ECO_NormalSpeedTimer
154 Alarm_ECO_NormalSpeedTotalTimer
155 Alarm_ECO_OverSpeedingDistance
156 Alarm_ECO_OverSpeedingTotalDistance
157 Alarm_ECO_OverSpeedingTimer
158 Alarm_ECO_OverSpeedingTotalTimer
159 Alarm_ECO_MaxRPM
160 Alarm_ECO_RPMGreenBandDistance
161 Alarm_ECO_RPMGreenBandTotalDistance
162 Alarm_ECO_RPMGreenBandTimer
163 Alarm_ECO_RPMGreenBandTotalTimer
164 Alarm_ECO_RPMRedBandDistance
165 Alarm_ECO_RPMRedBandTotalDistance
166 Alarm_ECO_RPMRedBandTimer
167 Alarm_ECO_RPMRedBandTotalTimer
170 Alarm_ECO_IdlingEvent
171 Alarm_ECO_CruiseControlTimer
172 Alarm_ECO_CruiseControlTotalTimer
173 Alarm_ECO_CruiseControlDistance
174 Alarm_ECO_CruiseControlTotalDistance
180 Alarm_ECO_BreakCounter
181 Alarm_ECO_HarshBreakCounter
182 Alarm_ECO_ExtremeBreakCounter
183 Alarm_ECO_HarshAccelerationCounter
184 Alarm_ECO_CorneringCounter
185 Alarm_ECO_TotalBreak
186 Alarm_ECO_TotalHarshBreak
187 Alarm_ECO_TotalExtremeBreak
188 Alarm_ECO_TotalHarshAcceleration
189 Alarm_ECO_TotalCornering
200 Alarm_GeoZone1
201 Alarm_GeoZone2
202 Alarm_GeoZone3
203 Alarm_GeoZone4
204 Alarm_GeoZone5
205 Alarm_GeoZone6
206 Alarm_GeoZone7
207 Alarm_GeoZone8
208 Alarm_GeoZone9
209 Alarm_GeoZone10
210 Alarm_GeoZone11
211 Alarm_GeoZone12
212 Alarm_GeoZone13
213 Alarm_GeoZone14
214 Alarm_GeoZone15
215 Alarm_GeoZone16
216 Alarm_GeoZone17
217 Alarm_GeoZone18
218 Alarm_GeoZone19
219 Alarm_GeoZone20
220 Alarm_GeoZone21
221 Alarm_GeoZone22
222 Alarm_GeoZone23
223 Alarm_GeoZone24
224 Alarm_GeoZone25
225 Alarm_GeoZone26
226 Alarm_GeoZone27
227 Alarm_GeoZone28
228 Alarm_GeoZone29
229 Alarm_GeoZone30
230 Alarm_GeoZone31
231 Alarm_GeoZone32
232 Alarm_GeoZone33
233 Alarm_GeoZone34
234 Alarm_GeoZone35
235 Alarm_GeoZone36
236 Alarm_GeoZone37
237 Alarm_GeoZone38
238 Alarm_GeoZone39
239 Alarm_GeoZone40
240 Alarm_GeoZone41
241 Alarm_GeoZone42
242 Alarm_GeoZone43
243 Alarm_GeoZone44
244 Alarm_GeoZone45
245 Alarm_GeoZone46
246 Alarm_GeoZone47
247 Alarm_GeoZone48
248 Alarm_GeoZone49
249 Alarm_GeoZone50
300 Alarm_Trip
301 Alarm_Trip_Time
302 Alarm_Trip_Distance
350 Alarm_DriverID
400 Alarm_TemperatureSensor1
401 Alarm_TemperatureSensor1_ID
402 Alarm_TemperatureSensor2
403 Alarm_TemperatureSensor2_ID
404 Alarm_TemperatureSensor3
405 Alarm_TemperatureSensor3_ID
490 Alarm_TiltStatus
500 Alarm_OBD_EngineRPM
501 Alarm_OBD_BatteryVoltage
502 Alarm_OBD_EngineCoolantTemperature
503 Alarm_OBD_VehicleSpeed
504 Alarm_OBD_TotalDistance
505 Alarm_OBD_FuelRate
506 Alarm_OBD_TotalFuelUsed
507 Alarm_OBD_IntakeAirTemperature
508 Alarm_OBD_IntakeManifoldAbsolutePressure
550 Alarm_OBD_MalfunctionIndicatorLamp
551 Alarm_DiagnosticTroubleCodesCount
552 Alarm_OBD_CalculatedEngineLoad
553 Alarm_OBD_MAFAirFlowRate
554 Alarm_OBD_ThrottlePosition
555 Alarm_OBD_RunTimeSinceEngineStart
556 Alarm_OBD_FuelTankLevelInput
557 Alarm_OBD_DistanceTraveledSinceCodesCleared
558 Alarm_OBD_AbsoluteThrottlePositionD
559 Alarm_OBD_TimeRunWithMILOn
560 Alarm_OBD_EngineOilTemperature
700 Alarm_CANBus_Tachograph1_WorkingState1
701 Alarm_CANBus_Tachograph1_WorkingState2
702 Alarm_CANBus_Tachograph1_VehicleMotion
703 Alarm_CANBus_Tachograph1_Driv_1_Time_Rel_States
704 Alarm_CANBus_Tachograph1_Driver1_Card
705 Alarm_CANBus_Tachograph1_VehicleOverspeed
706 Alarm_CANBus_Tachograph1_Driv_2_Time_Rel_States
707 Alarm_CANBus_Tachograph1_Driver2_Card
708 Alarm_CANBus_Tachograph1_SystemEvent
709 Alarm_CANBus_Tachograph1_HandlingInformation
710 Alarm_CANBus_Tachograph1_TachographPerformance
711 Alarm_CANBus_Tachograph1_DirectionIndicator
712 Alarm_CANBus_Tachograph1_VehicleSpeed
713 Alarm_CANBus_EngineTemperature1_EngineCoolantTemperature
714 Alarm_CANBus_ElectronicEngineController1_ActualEnginePercent
715 Alarm_CANBus_ElectronicEngineController1_EngineSpeed
716 Alarm_CANBus_EngineHours_EngineTotalHours
717 Alarm_CANBus_VehicleDistance_TotalVehicleDistance
718 Alarm_CANBus_HighResolutionFuelConsumption_TotalFuelUsed
719 Alarm_CANBus_DashDisplay_FuelLevel1
720 Alarm_CANBus_AmbientConditions_AmbientAirTemperature
721 Alarm_CANBus_FuelEconomy_FuelRate
722 Alarm_CANBus_FuelEconomy_InstantaneousFuelEconomy
723 Alarm_CANBus_AirSupplyPressure_ServiceBrakeAirPressureCircuit_1
724 Alarm_CANBus_AirSupplyPressure_ServiceBrakeAirPressureCircuit_2
725 Alarm_CANBus_AftertreatmentDieselExhaustFluidTankInformation_Tank1_Level
742 Alarm_CANBus_TruckBus_ElectronicEngineController2_AcceleratorPedalPosition_1
743 Alarm_CANBus_TruckBus_ElectronicEngineController2_EnginePercentLoad
744 Alarm_CANBus_Truck_VehicleWeight_AxleWeight1
745 Alarm_CANBus_Truck_VehicleWeight_AxleWeight2
746 Alarm_CANBus_Truck_VehicleWeight_AxleWeight3
747 Alarm_CANBus_Truck_ServiceInformation_ServiceDistance
748 Alarm_CANBus_Truck_PTODriveEngagement_PTOEngageStat
749 Alarm_CANBus_Truck_CombinationVehicleWeight_GrossCombinationVehicleWeight
750 Alarm_CANBus_TruckBus_Electronic_Retarder_Controller_1_RetarderTorqueMode
751 Alarm_CANBus_TruckBus_Electronic_Retarder_Controller_1_RetarderSelection
752 Alarm_CANBus_Bus_DoorControl1_DoorPosition
753 Alarm_CANBus_Bus_DoorControl1_RampWheelChairlift
754 Alarm_CANBus_Bus_DoorControl1_DoorsStatus2
755 Alarm_CANBus_Bus_DoorControl2
784 Alarm_CANBus_TruckBus_CruiseControl
785 Alarm_CANBus_Bus_AlternatorSpeed_AlternatorStatus1
786 Alarm_CANBus_Bus_AlternatorSpeed_AlternatorStatus2
787 Alarm_CANBus_Bus_AlternatorSpeed_AlternatorStatus3
788 Alarm_CANBus_Bus_AlternatorSpeed_AlternatorStatus4
789 Alarm_CANBus_Bus_ElectronicTransmissionController2_SelectedGear
790 Alarm_CANBus_Bus_ElectronicTransmissionController2_CurrentGear
791 Alarm_CANBus_Bus_AirSuspensionControl4_FrontAxleLeft
792 Alarm_CANBus_Bus_AirSuspensionControl4_FrontAxleRight
793 Alarm_CANBus_Bus_AirSuspensionControl4_RearAxleLeft
794 Alarm_CANBus_Bus_AirSuspensionControl4_RearAxleright
795 Alarm_CANBus_DashDisplay_FuelLevel2
796 Alarm_CANBus_ElectronicBrakeController_BrakePedalPosition
797 Alarm_CANBus_FuelConsumptionGaseous_TotalFuelUsed
798 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_ParkingBrakeSwitch
799 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_WheelBasedSpeed
800 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_CruiseControlActive
801 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_BrakeSwitch
802 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_ClutchSwitch
803 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_PtoState
804 Alarm_CANBus_TruckBus_CruiseControlVehicleSpeed_CruiseControlStates
805 Alarm_CANBus_Bus_VehicleElectricalPower_HybridBatteryPackRemainingCharge
806 Alarm_CANBus_Bus_VehicleDynamicStabilityControl2_SteeringWheelAngle
807 Alarm_CANBus_ElectronicEngineController14_FuelType
808 Alarm_CANBus_EngineFluidLevelPressure_EngineOilLevel
809 Alarm_CANBus_EngineFluidLevelPressure_EngineOilPressure
810 Alarm_CANBus_EngineFluidLevelPressure_CoolantLevel
811 Alarm_CANBus_TellTaleStatus
812 Alarm_CANBus_FuelConsumption_EngineTotalFuelUsed
813 Alarm_CANBus_Truck_VehicleWeight_AxleWeight4

# Reference

[1] 'Protocol Buffers,Developer Guide', August, 2018.[Online].Available: https://developers.google.com/protocol-buffers/docs/overview.[Accessed: 22- April- 2019].

[2] 'Diagnostic Trouble Code', Jan 2019. [Online]. Available: https://de.wikipedia.org/wiki/Diagnostic_Trouble_Code. [Accessed: 20- April- 2019].

[3] 'DTCs'. [Online]. Available: http://vidaresources.volvocars.biz/help-wbt/us/10dd19a196f77d6cc0a801cc013ec511.html. [Accessed: 20- April- 2019].

[4] Greg Coburn, Engineering and Research Branch BAR Advisory Group Meeting,"Permanent Diagnostic Trouble Codes",2017.

Last Updated: 9/27/2020, 2:45:56 PM