Skip to content

Universal Tracker

The Universal Tracker is available for the SODAQ ONE, SARA AFF and SARA SFF.
With this software you will turn your board into a low power tracker.

Requirements

  • SODAQ SARA SFF
  • Antenna
  • SIM

The Universal Tracker will work with any compatible simcard / network operator.

Getting started

If you don't have the boardfiles yet, follow the steps on the Getting started page.

Connect the antenna to the board.

Connect the device with the USB cable to your computer.

T-Mobile NL
If you use T-Mobile NB-IoT do not put your simcard in your device.
We don't want it to register itself.

Any other network
All other networks don't require a IMEI registration.
It's safe to put your simcard in your device.

Github

Download the latest version of the Universal Tracker from our GitHub.

download_universal_tracker

  1. Unzip.
  2. Open Sodaq_Universal_Tracker.ino with the Arduino IDE.
  3. Check if under tools the board and port are correct.
  4. Upload the code to your board.

Bootmenu settings

The default code is uploaded to your board. It's time now to set the correct settings.

When the device is powered or has been reset, there is a 5 second bootup delay. After the 5 second delay the bootmenu is shown.

Note

The command ntype is blocking.
When the ntype=0 the software won't boot, but instead it will reshow the bootmenu.
It's recommended to update all other settings first.

Open the Serial Monitor.
In the bottom check if NL and CR is enabled.

To update for example the fix interval to 1 minute, send fi=1. So without any spaces.

Dashboard

We now have a sending device.
You can either send the data to your own server or make use of one of the following examples.

AllThingsTalk

  1. Create or login to AllThingsTalk.
  2. Claim your device.

claim device

Note

If you don't have an Activation Code, contact SODAQ.
Provide us your IMEI and tell you need it for the "Tracker Application".
We will then Generate an Activation Code for you.

If you already have an Activation Code, but it wasn't created for the Tracker, then you can modify it to be used with the tracker application.

Assets

Check if you have the same Asset names.

assets

Voltage

Create a New Asset. Give it the name v.
Choose Integer as type.
Create the asset.
Click on the asset name to edit the title.

Do the same for the following assets:

  • ttf
  • timestamp
  • t
  • speed
  • sat

GPS

Add a new asset, type: Object, Name g.
In the advanced tab, paste the following json code:

{
    "type": "object",
    "properties": {
        "latitude": {
            "type": "number"
        },
        "longitude": {
            "type": "number"
        }
    }
}

Hit Save, you can edit the Title later.

ABCL

In the ABCL we tell AllThingsTalk how to decode the data we have send to actual asset values.
Go to -> Settings -> Payload Formats -> Check the checkbox -> Use the decoder below.

{
  "sense": [
    {
      "asset": "timestamp",
      "value": {
        "byte": 0,
        "bytelength": 4,
        "signed": false,
        "byteorder": "little",
        "type": "integer"
      }
    },
    {
      "asset": "v",
      "value": {
        "byte": 4,
        "bytelength": 1,
        "signed": false,
        "calculation": "val * 10 + 3000",
        "type": "integer"
      }
    },
    {
      "asset": "t",
      "value": {
        "byte": 5,
        "bytelength": 1,
        "signed": true,
        "type": "integer"
      }
    },
    {
      "asset": "g",
      "value": {
        "latitude": {
          "byte": 6,
          "bytelength": 4,
          "signed": false,
          "byteorder": "little",
          "calculation": "val / 10000000",
          "type": "integer"
        },
        "longitude": {
          "byte": 10,
          "bytelength": 4,
          "signed": false,
          "byteorder": "little",
          "calculation": "val / 10000000",
          "type": "integer"
        },
        "altitude": {
          "byte": 14,
          "bytelength": 2,
          "signed": false,
          "byteorder": "little",
          "type": "integer"
        }
      }
    },
    {
      "asset": "speed",
      "value": {
        "byte": 16,
        "bytelength": 2,
        "signed": false,
        "byteorder": "little",
        "type": "integer"
      }
    },
    {
      "asset": "sat",
      "value": {
        "byte": 19,
        "bytelength": 1,
        "signed": false,
        "type": "integer"
      }
    },
    {
      "asset": "ttf",
      "value": {
        "byte": 20,
        "bytelength": 1,
        "signed": false,
        "type": "integer"
      }
    }
  ]
}

ThingsBoard

Follow this tutorial to setup your SODAQ Board with Universal Tracker code on ThingsBoard. https://thingsboard.io/docs/user-guide/integrations/sodaq/