0% found this document useful (0 votes)
79 views

OEM WebAPI 1.3

The document summarizes an OEM web API that allows third parties to control device settings and send messages to activate features on connected devices. It provides over a dozen API endpoints to get and set parameter templates, individual parameters, connectors, batch strings, driver lists, and more. It also describes endpoints to send asynchronous messages to devices to trigger actions like setting recovery mode, changing outputs, updating odometer readings, and immobilizing vehicles.

Uploaded by

Behnam Ganji
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

OEM WebAPI 1.3

The document summarizes an OEM web API that allows third parties to control device settings and send messages to activate features on connected devices. It provides over a dozen API endpoints to get and set parameter templates, individual parameters, connectors, batch strings, driver lists, and more. It also describes endpoints to send asynchronous messages to devices to trigger actions like setting recovery mode, changing outputs, updating odometer readings, and immobilizing vehicles.

Uploaded by

Behnam Ganji
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Digital Matter Telematics

OEM Web API


V1.3
9th February 2021
www.digitalmatter.com

1
1 REVISION HISTORY
Date Version Change
2020-04-13 1.0 First Recorded Version
2020-05-14 1.1 Batch string
2020-09-17 1.2 Driver List get and set
2021-02-09 1.3 New calls for setting individual parameters
Added information on how to check for async messages being actioned

2 INTRODUCTION
The OEM WebAPI provides a wealth of features which enable some control of device settings etc
from a 3rd party platform.

It enables the following two sets of commands:

1. OEM actions such as setting parameters, parameter templates, the batch string, and
connectors

2. Sending ASYNC messages to devices to activate outputs or features – e.g. turning on


recovery mode and immobilising a vehicle

The WebAPI brings some useful functionality - as the device can be controlled programmatically
based upon other events happening. Examples include:

• Setting connectors/parameter templates when provisioning a device in a 3rd party front-end


platform, without needing to go back to OEM.
• Changing parameter templates at certain times of the day (to adjust reporting rate)
• Allowing users to set their own device parameters from the front end-UI (be warned this will
have battery life, performance, and data usage implications)

Users will need to authenticate with basic authentication and their standard OEM username and
password.

Contact DM if you require a specific user account to be set up for API use.

If using .NET, a DLL can be provided by DM Support.

3 FURTHER RESOURCES
This document covers the specific API calls used. For more information about device behaviour,
parameter templates, connectors, the OEM server etc, see support.digitalmatter.com.
Some relevant links are provided where appropriate in this document.

2
4 CONTENTS
1 REVISION HISTORY .......................................................................................................................... 2
2 INTRODUCTION ............................................................................................................................... 2
3 FURTHER RESOURCES ..................................................................................................................... 2
4 CONTENTS ....................................................................................................................................... 3
5 DEVICE IDs ....................................................................................................................................... 4
6 OEM ACTIONS ................................................................................................................................. 5
6.1 Get a list of Parameter templates and set them. ................................................................... 5
6.1.1 Get Templates (GET) ....................................................................................................... 5
6.1.2 Set Single (GET): .............................................................................................................. 5
6.1.3 Set Parameter Template on Multiple devices (POST) ..................................................... 6
6.2 Setting Individual Parameters via API Call .............................................................................. 6
6.2.1 GetProductDefaultAdminParameters (GET) ................................................................... 6
6.3 Change Connectors ............................................................................................................... 12
6.4 Set Enabled ........................................................................................................................... 12
6.5 Set Custom Fields (for use with connectors) ........................................................................ 12
6.6 Set Batch String ..................................................................................................................... 13
6.7 Set the Driver List .................................................................................................................. 13
6.8 Get the Driver List ................................................................................................................. 14
7 ASYNC MESSAGING TO DEVICES ................................................................................................... 15
7.1 Checking Message Delivery................................................................................................... 15
7.2 0x001 – Resync Device Slots ................................................................................................. 17
7.3 0x002 - Remote Restart ........................................................................................................ 17
7.4 0x003 - Set Operational (recovery) mode............................................................................. 17
7.4.1 Set Operational Mode – Confirming the device has actioned recovery mode............. 19
7.5 0x004 - Set Digital Output ..................................................................................................... 19
7.5.1 Set Output – confirming the device has actioned the change ...................................... 20
7.6 0x0012 - Set Odometer ......................................................................................................... 20
7.7 0x0013 - Set Run Hours ......................................................................................................... 20
7.8 0x0015 - Third Party Data ..................................................................................................... 20
7.9 0x0016 – Geofence Download .............................................................................................. 21
7.10 0x0100 – Immobilise ............................................................................................................. 21
7.10.1 Immobilisation – Determining Immobilisation Status .................................................. 21
7.11 0x0101 - Immobilise With Expiry .......................................................................................... 21

3
5 DEVICE IDs
The main device IDs are below. Some calls require the device ID to be passed.

Remora 33 (0x21)
Dart 34 (0x22)
Oyster v1 Cellular 58 (0x3A)
Remora2 62 (0x3E)
G62 67 (0x43)
Dart2 68 (0x44)
G200 70 (0x46)
Yabby Wifi Cellular 72 (0x48)
Yabby GPS Cellular 73 (0x49)
Falcon Cellular 74 (0x4A)
Bolt 75 (0x4B)
Oyster2 77 (0x4D)
Eagle 78 (0x4E)
G120 79 (0x4F)

Device ID’s can also be found in the “Product” column of the device table in OEM.
For example below shows 79.2 – 79 = the G120, .2 indicates it is the 4G variant.

4
6 OEM ACTIONS
6.1 Get a list of Parameter templates and set them.
Parameter templates can be created from the OEM UI – see here.
It is best to make use of templates where possible, as then we can be sure we are applying the same
parameters across a group of devices. This also has the additional benefit that the applied template
is indicated in the OEM UI – so at a glance we can see which devices have the same parameters. The
same cannot be said when we set parameters individually.

6.1.1 Get Templates (GET)


This method returns details (name and product ID) of either a specific parameter template X, or all
templates accessible to the user.

Request Endpoint
Name Method Description
https://api.oemserver.com/v1.0/paramtemplate/get/X GET Get template with ID X

Url Parameters
Name Data Type Required/Optional Description
X number Optional If added to the query, template X will be returned. Otherwise,
all templates accessible by the user will be returned.

Example response - Template JSON


{
"TemplateId": 3,//int
"Description": "No trip template.",//string
"Name": "No Trips",//string
"ProductId": 30,//byte
"ProductName": "",//string
}

6.1.2 Set Single (GET):


This sets a parameter template X on a single device. Device can be identified via DM Serial or IMEI.

Request Endpoint (set by Serial)


Name Method Description
https://api.oemserver.com/v1.0/paramtemplate/set/X?serial=Y GET Set parameter template X
on Serial Y

Url Parameters
Name Data Type Required/Optional Description
X number required This is the id of the parameter template to be set.
Y Number Required Serial to apply template to.

Request Endpoint (set by IMEI)


Name Method Description
https://api.oemserver.com/v1.0/paramtemplate/setbyimei/X?imei=Z GET Sets parameter
template X on IMEI
Z

5
Url Parameters
Name Data Type Required/Optional Description
X Number Required ID of the parameter
template to be set
Z Number Required IMEI of device to
apply template to.

6.1.3 Set Parameter Template on Multiple devices (POST)


Request Endpoint (Set by Serial)
Name Method Description
https://api.oemserver.com/v1.0/parametertemplate/set/X POST Sets parameter template X

Url Parameters
Name Data Type Required/Optional Description
X Number Required ID of the parameter
template to be set

Example POST Body


Send a POST body containing a list of serials like this:
{
“Devices”: [102471, 123456]
}
Request Endpoint (Set by IMEI)
Name Method Description
https://api.oemserver.com/v1.0/parametertemplate/setbyimei/X POST Sets parameter
template X

Url Parameters
Name Data Type Required/Optional Description
X Number Required ID of the parameter
template to be set

Example POST Body


List of IMEIs

{
"Devices":["123456789090","123456789090"]
}

6.2 Setting Individual Parameters via API Call


6.2.1 GetProductDefaultAdminParameters (GET)
This method retrieves the default admin parameters of a device that exists in OEM with the provided
ProductID. When setting parameters with the other calls in this document, we would not go and
then simply set all these parameters on a device. Rather it will show us how to structure our call –
and if we only wanted to set a single parameter, we only need to pass this section rather than the
entire set of parameters.

6
Request Endpoint
Name Method Description
v1.0/TrackingDevice/GetProductDefaultAdminParameters/ProductId GET Returns all the default
admin parameters for a
device type in OEM

Url Parameters
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM to be
queried.

Query Parameter
Name Data Type Required/Optional Description
nocomments string optional If added to the query, the
returned JSON will omit
comments. The JSON with
omitted comments can be
used as a template for the
calls to set templates

Example
https://api.oemserver.com/v1.0/TrackingDevice/GetProductDefaultAdminParameters/62?nocomments

The above example will return the default admin parameters in JSON for the Remora2 (ProductId 62)
device type from OEM as shown below:

{
"Devices": [123456,654321],
"ParamSections": [
{
"Id": 100,
"Params": {
"Upload_Server": "s2.oemserver.com",
"Upload_Port": "9980",
"fEncrypted": "1"
}
},
{
"Id": 200,
"Params": {
"External_Server": "",
"External_Port": "8980",
"bSlotCheckPeriod": "7",
"fSupportsAsync": "0",
"fSendVersionData": "0"
}
},
{
"Id": 300,
"Params": {
"Upload_Server": "",
"File_Path": "/handlers/geofencedownload.ashx"
}
},
{
"Id": 1000,
"Params": {
"APN_String": "internet"
}
},
{
"Id": 2000,
"Params": {
"b4GRAT": "0",
"sPreset": "",
"sCustom": ""

7
}
}
]
}

6.2.1.1 GetProductDefaultDeviceParameters (GET)


This method retrieves the default system parameters of a device that exists in OEM with the
provided ProductID.

Request Endpoint
Name Method Description
v1.0/TrackingDevice/GetProductDefaultDeviceParameters/ProductId GET Returns all the default
device parameters for a
device type in OEM

Url Parameter
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM to be
queried.

Query Parameter
Name Data Type Required/Optional Description
nocomments string optional If added to the query, the
returned JSON will omit
comments. The JSON with
omitted comments can be
used as a template.

Example
https://api.oemserver.com/v1.0/TrackingDevice/GetProductDefaultDeviceParameters/62?nocomments

The above example will return the default device parameters in JSON for the Remora2 (ProductId 62)
device type from OEM.
6.2.1.2 SetAdminParameters (POST)
A POST method added to replace the values of admin parameters set on devices that exists in OEM
with the provided ProductId. All parameters will be overwritten with the ones supplied, including
setting any not supplied back to default.

Request Endpoint
Name Method Description
v1.0/TrackingDevice/SetAdminParameters/ProductId POST Posts data to the OEM
Web API that is used to
replace admin parameters.

Url Parameter
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM.

Body
Name Data Type Required/Optional Description
Devices string array required This is a list of the device
serial numbers.

8
ParamSections JSON object array optional If this object is empty or is
omitted from the POST, the
admin parameters from the
list of devices will be set to
their default values.

Example
JSON data to be posted to https://api.oemserver.com/v1.0/TrackingDevice/SetAdminParameters/62
{
"Devices": [
"232759"
],
"ParamSections": [
{
"Id": 1000,
"Params": {
"APN_String": "APN_Updated_API"
}
},
{
"Id": 100,
"Params": {
"Upload_Server": "qa.oemserver.com",
"Upload_Port":"9980",
"fEncrypted":"yes"
}
}
]
}

The above example will set the existing admin parameters for the Remora2 device with serial
number 232759 using the provided JSON. Any omitted admin parameters will be set to their
defaults.
6.2.1.3 SetAdminParameters (PUT)
This PUT method updates the values of admin parameters set on the device. This can be used to
update a specific parameter or parameters while leaving the others unchanged.

Request Endpoint
Name Method Description
v1.0/TrackingDevice/SetAdminParameters/ProductId PUT Posts data to the OEM
Web API that is used to
update admin parameters.

Url Parameter
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM.

9
Body
Name Data Type Required/Optional Description
Devices string array required This is a list of the device
serial numbers.
ParamSections JSON object array required If this object is empty or is
omitted from the PUT, no
update will occur, and an
error message will be
returned.

Example
JSON data to be posted to https://api.oemserver.com/v1.0/TrackingDevice/SetAdminParameters/62
{
"Devices": [
"232759"
],
"ParamSections": [
{
"Id": 1000,
"Params": {
"APN_String": "APN_Updated_API2"
}
}
]
}

6.2.1.4 SetDeviceParameters (POST)


This is a POST method added to replace the values of device system parameters set on devices that
exists in OEM with the provided ProductId. All parameters will be overwritten with the ones
supplied, including setting any not supplied back to default.

Request Endpoint
Name Method Description
v1.0/TrackingDevice/SetDeviceParameters/ProductId POST Posts data to the OEM
Web API that is used to
replace device parameters.

Url Parameter
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM.

Body
Name Data Type Required/Optional Description
Devices string array required This is a list of the device
serial numbers.
ParamSections JSON object array optional If this object is empty or is
omitted from the POST, the
device parameters from
the list of devices will be
set to their default values.

10
Example
JSON data to be posted to https://api.oemserver.com/v1.0/TrackingDevice/SetDeviceParameters/62
{
"Devices": [
"232759"
],
"ParamSections": [
{
"Id": 2075,
"Params": {
"bPeriodicUploadHrMin": "100"
}
},
{
"Id": 2300,
"Params": {
"bMovementCount": "100"
}
},
{
"Id": 2400,
"Params": {
"bTripEndTimeSec_10": "100"
}
}
]
}
The above example will set the existing device system parameters for the Remora2 device with serial
number 232759 using the provided JSON. Any omitted device parameters will be set to their
defaults.
6.2.1.5 SetDeviceParameters (PUT)
A PUT method added to update the values of device system parameters set on devices that exists in
OEM with the provided ProductId.

Request Endpoint
Name Method Description
v1.0/TrackingDevice/SetDeviceParameters/ProductId PUT Posts data to the OEM
Web API that is used to
update device parameters.

Url Parameter
Name Data Type Required/Optional Description
ProductId number required This is the id of the product
that exists in OEM.

Body
Name Data Type Required/Optional Description
Devices string array required This is a list of the device
serial numbers.
ParamSections JSON object array required If this object is empty or is
omitted from the PUT, no
update will occur, and an

11
error message will be
returned.

Example
JSON data to be posted to https://api.oemserver.com/v1.0/TrackingDevice/SetDeviceParameters/62
{
"Devices": [
"232759"
],
"ParamSections": [
{
"Id": 2400,
"Params": {
"bTripEndTimeSec_10": "100"
}
}
]
}

The above example will set the existing device parameters for the Remora2 device with serial
number 232759 using the provided JSON. Any omitted device parameters will keep their existing
values.

6.3 Change Connectors


Get Connectors:
https://api.oemserver.com/v1.0/connector/get

Set Connector:
https://api.oemserver.com/v1.0/connector/set/<id>?serial=<serial>

Or, for multiple devices (POST):


https://api.oemserver.com/v1.0/connector/set/<id> with a body containing a list of serials like:

{
“Devices”: [102471, 123456]
}

6.4 Set Enabled


This will reject any connection to OEM for a specific device. It may be useful if you wish to disable a
device and avoid billing in future. The call is by product, so replace the product name as required.

Set Enabled:
https://api.oemserver.com/v1.0/<product name>/setenabled/<serial>?enabled=<true/false>

eg.: https://api.oemserver.com/v1.0/g60/setenabled/102471?enabled=true

6.5 Set Custom Fields (for use with connectors)


Three Custom Fields can be set.

12
This may be used to assign an equipment ID against a serial in OEM, so the ID can be sent as part of
the payload when using the HTTP connector. These fields can be included in the URL or sent as a
HTTP header for easy identification by the end platform.

Calls to set the custom fields are as below:

Get the custom fields:

curl -X GET -u username:password


"https://api.oemserver.com/v1.0/trackingdevice/getcustomfields/<product ID>/<device
serial>"

Response: {"Custom1":"some data","Custom2":"some data","Custom3":null}

Set the custom fields:

curl -X POST --data '{"Custom1":"test1","Custom2":"test2","Custom3":null}' -H


"Content-Type: application/json" -u username:password
"https://api.oemserver.com/v1.0/trackingdevice/setcustomfields/<product ID>/<serial>"

Response: {"Custom1":"test1","Custom2":"test2","Custom3":null}

6.6 Set Batch String


A single device’s batch string may be set. Setting a batch string is a handy way to notate individual or
multiple units to identify them.

Set Single (GET):

https://api.oemserver.com/v1.0/trackingdevice/setbatchstring/<productId>/<serial>/?batchString=<
batchstring> - Set <batchstring> on <productId> and <serial>

Example for an Oyster2 with serial 12345 and product ID 77:

curl --verbose -k --user <username>:<password>


https://api.oemserver.com/v1.0/trackingdevice/setbatchstring/77/12345/?batchString=test

6.7 Set the Driver List


Support Documentation:
- Driver ID and Immobilisation with Powered Devices
- Managing Driver Lists from a 3rd Party Server

This allows for devices to be immobilised, and only started when a valid driver ID is presented. These
calls allow us to send the list of valid IDs down to the device.
This can alternatively be done via CSV import in the OEM UI (Device Operations -> Set Drivers)

Responds true if the input is valid.

13
Required fields:
1. ID Type
a. 1 = DMRFID
b. 2 = iButton
c. 3 = FourDigitPin (deprecated, only for use with discontinued DM Keypad)
d. 4 = FiveDigitPin (deprecated, only for use with discontinued DM Keypad)
e. 7 = Wiegand
2. IdData
a. The iButton code, RFID serial etc.
3. Flags
a. 1 = enabled to drive
b. 0 = not enabled to drive
4. Layout
a. Driver ID List Layout, use 0

Example cURL
curl -X POST 'https://api.oemserver.com/v1.0/driverlist/set/310056' -
H 'Authorization: Basic user/pass' -H 'Content-Type: application/json' --data-
raw '{"Drivers": [{"IdType": 7, "IdData": "FBI0UA==", "Flags": "01"},{"IdType":1,"IdData":"001CB
70A7B","Flags":"01"}], "Layout": 0}'

6.8 Get the Driver List


URL https://api.oemserver.com/v1.0/driverlist/get/<deviceserial>
i.e. to get the list from device 123456,
https://api.oemserver.com/v1.0/driverlist/get/123456

Example cURL
curl -X GET 'https://api.oemserver.com/v1.0/driverlist/get/310056' -
H 'Authorization: Basic <user/pass>' --data-raw ''

Response
{"Layout":0,"Drivers":[{"IdType":7,"IdData":"FBI0UAAA","Name":null,"Flags":1}]}

14
7 ASYNC MESSAGING TO DEVICES
The OEM Server and DM devices make use of an ASYNC messaging protocol to send messages
between the device and server. This enables various command and control of the device including:

• Turning recovery mode off/on


• Resetting the device

Many of these messages are handled in the interaction between the device and OEM server.
However, the OEM WebAPI allows any async message to be queued via API call. Once the call is
made the message is queued on OEM server until the device connects in - then it is delivered to the
device.

Message Structure
URL: https://api.oemserver.com/v1.0/asyncmessaging/send/[device serial]

Content Type: application/json


Accept Header: application/json
Authentication: Basic Authentication using a user's OEM login credentials

The DM ASYNC message structure must be adhered to which requires the following:
• Message Type
• CAN Address - this is always 0 x FFFFFFFF - meaning it is a message to be sent to a device.
• Message Expiry - time for the message to expire if left unprocessed (i.e. device doesn't
connect in)

The message structure is the same as in the Direct Third-Party Server documentation. To use the API,
we must simply pass the same data in JSON format, and OEM will forward this to the device.

7.1 Checking Message Delivery


To check for ASYNC message delivery when testing, go to the Details tab in OEM

The queue and history of messages is displayed (you can toggle between queue and history with the
button)

15
Some messages have descriptions indicating what they are for.

When posting an asynchronous message to a device via the OEM WebAPI – the response only
indicates that the payload was valid, and that OEM has received the message. It does not indicate
that it has been passed down to the device and the device has actioned the message.

The ASYNC message queue goes into more detail, and how to tell whether or not the device has
actioned a command is described with each message where appropriate.

16
7.2 0x001 – Resync Device Slots
This triggers the device to resync slots (FW, parameters, and driver lists). If the device is in trip they
may not be updated until the end of the trip.

Example:
Body:
{
"MessageType":1, // 0x0001 remote reset
"CANAddress":4294967295, //0xFFFFFFFF, HOST_ADDRESS - message to device
"ExpiryDateUTC":"2018-07-20T18:25:43.511Z" // message expiry
}

Payload is empty - we are only sending the message type, host address and expiry.

7.3 0x002 - Remote Restart


This triggers the device to perform a firmware restart once the async is received. URL and headers as
above,

Example
Body:
{
"MessageType":2, // 0x0002 remote reset
"CANAddress":4294967295, //0xFFFFFFFF, HOST_ADDRESS - message to device
"ExpiryDateUTC":"2018-07-20T18:25:43.511Z" // message expiry
}

Payload is empty - we are only sending the message type, host address and expiry.

7.4 0x003 - Set Operational (recovery) mode


Support Documentation:
- Common Concepts - Recovery Mode

This message remotely sets the operational mode of the device. Currently this is used to switch
between normal operation and recovery mode. The device supports a mode timeout parameter.
This is currently only valid with a switch to recovery mode as the device will switch into NORMAL
mode after the timeout has elapsed.

Payload:
Offset Length Data Type Description
0 1 BYTE Set operational mode:
NORMAL = 1,
RECOVERY = 3
1 4 UINT Absolute time in seconds since 1 Jan 2013 after which the mode
should be cancelled.

17
Switch mode, no expiry.
{
"MessageType":3, // Set Operational Mode 0x0003
"CANAddress":4294967295, //0xFFFFFFFF,//HOST_ADDRESS - send to device
"Data":[1], // 1 for standard Mode, 3 for Recovery mode
"ExpiryDateUTC":"2018-07-20T18:25:43.511Z" // Absolute time in seconds
since 1 Jan 2013 after which the mode should be cancelled.
}

Setting recovery mode with expiry


{
"MessageType":3,
"CANAddress":4294967295,
"Data":[03,192,73,142,13],
"ExpiryDateUTC":"2020-03-19T00:00:00.000Z"
}

In this example, the async message itself will expire on March 19, 2020, 00:00 UTC.
So, if it is not actioned on the device by this time, it will expire.

The recovery mode will expire on 2020-03-17 06:40:00 UTC.

The data field is generated as follows:

Recovery mode - 0x03

Expiry time as above is 227428800 seconds since 1/1/13 00:00 UTC. Converting to hex and little
endian, C0 49 8E 0D

See Times in the DM Protocol for more information and the calculator pictured below

So, we must send 0x03C0498E0D


Then we send the byte array in JSON format
03 = 3
C0 = 192
49 = 73
.....

Giving:
[03, 192, 73, 142, 13]

18
7.4.1 Set Operational Mode – Confirming the device has actioned recovery mode.
The response to the API call only indicates OEM has received the message. On the server, we want
to keep track of whether the device is/isn’t currently in recovery mode. This information is reported
in the device payload in a few ways

1. Log Reason 36 (Recovery Mode On) and 37 (Recovery Mode Off)


When the device enters/exits recovery mode, it will connect to the server and send the
corresponding log reason.

2. Bit 7 of the Device Status Flags (from Digital Data FID 2)


This bit will be set when in recovery mode, and unset when not in recovery mode.

7.5 0x004 - Set Digital Output


Support Documentation:
- Common Concepts - Digital Outputs and Remote Output Control

This message remotely sets digital outputs on a device. The output numbers are physical outputs (no
logical remapping). The firmware translates the logical level into a physical level depending on the
active high setting in system parameters. The changed mask allows the server to change required
outputs and not affect others.

For this message to have any effect - the output being changed must be set up as
Digital Output under the Digital Output parameters.

Payload:

Data structure for to set digital outputs.


Offset Length Data Type Description
0 2 UINT16 Logical level
b0 – output 0 logical level: On = 1; Off = 0
b1 – output 1 logical level: On = 1; Off = 0
b2 – etc.
2 2 UINT16 Change mask
b0 – set output 0 according to logical level
b1 – set output 1 according to logical level

JSON Example
{
"MessageType":4,
"CANAddress":4294967295,//0xFFFFFFFF,//HOST_ADDRESS
"Data":[15,15,6,0],
"ExpiryDateUTC":"2020-03-18T18:25:43.511Z"
}

19
This results in:
Change mask of 0xFF - i.e. set all outputs according to the logical level.
Output 1 and 2 (0110 = 6) are turned on.

7.5.1 Set Output – confirming the device has actioned the change
We can keep track as to whether our change has been applied and the state of our outputs in a few
places:

1. Field ID 2 – Digital Data


We simply look at the status of the relevant output(s)

2. Digital Output Changed Log Reason


These logs are not enabled by default, but this can be adjusted in the parameters

If enabled, a log with Log Reason 10 - Digital Output Changed will be generated on a change.

7.6 0x0012 - Set Odometer


Payload:
Offset Length Data Type Description
0 4 UINT32 The odometer value in metres/10

7.7 0x0013 - Set Run Hours


Payload:
Offset Length Data Type Description
0 4 UINT32 The run hours value in seconds

Both Odo and Run Hours can also be set via SMS, see here - On Device Odometer and Run Hours

7.8 0x0015 - Third Party Data


For use with RS232 Passthrough Mode

Payload:
Offset Length Data Type Description
0 N BYTE[] Third Party

20
7.9 0x0016 – Geofence Download
This triggers a connection to the geofence server (if configured). For more information see here.

The payload is empty.

7.10 0x0100 – Immobilise


Support Documentation:
- Driver ID and Immobilisation with Powered Devices

Payload:
Offset Length Data Type Description
0 1 BOOL True = immobiliser on. This is the logical level – physical levels
(active high/low) are determined by system parameters.

JSON example
{
"MessageType":256, // 0x0100 – Immobilise,
"CANAddress":4294967295, //0xFFFFFFFF,//HOST_ADDRESS
"Flags":01,
"Data":[1], // 1 to immobilise, 0 to turn off immobilisation
"ExpiryDateUTC":"2018-07-20T18:25:43.511Z"
}

7.10.1 Immobilisation – Determining Immobilisation Status


We can determine if our message has been actioned and the current status in the following ways:

1. Field ID 2 – Digital Data


As with 0x004 – we can just look at the status of the Digital Output we have set up with function
Immobiliser

2. Log Reason 38 (Immobiliser On) and 39 (Immobiliser Off)


The device will generate these logs when immobilisation is turned on or off.

7.11 0x0101 - Immobilise With Expiry


Only available on G62 cellular. This message is the same as Immobilise (0x0100), but with an expiry
time. After the expiry time, the immobiliser logic level will return to the previous state. Resetting the
device will also return it to the previous state.
Payload:
Offset Length Data Type Description
0 1 BOOL True = immobiliser on. This is the logical level – physical levels
(active high/low) are determined by system parameters.
1 4 UINT32 Expiry time in seconds

21

You might also like