Technology used to run the CheckFox Dashboard

What technology and APIs are used to run the CheckFox dashboard?

KEY NAME

KEY DESCRIPTION

LICENCE

Apache

Webserver

Apache License

Nginx

Webserver - reverse-proxy to handle static files

BSD

PHP 7.x

Server-side scripting language

BSD

MySQL

Database server

GPL

React JS

Frontend JavaScript framework developed by Facebok

MIT License

MUI CSS

Material design UI framework

MIT License

Open Street Maps

OSM map tiles and geo-location APIs are used

ODbL + CC-BY-SA

 

Recommended API credentials

CUSTOMER [R] in order to see msg
OPT_INTEGRATOR in order to see IDs of basestations and repetitions
COVERAGE TOOL in order to see and use Global coverage API
OPT_STATION_LOCATION (for SOs to see location of BTSs and distances)

 

How data are collected (and from where)

1. Sigfox UPLINK callback

First callback received from Sigfox to let the dashboard know about measurement. We fetch those informations from the callback:

 

  • device, time, duplicate, station, snr, rssi, data, seqNumber

 

Device, seqNumber and time are used to calculate our internal measurement ID.

Station, snr and rssi are used to display first basestation in the measurement, also used to display first station quickly in the device itself.

Data - our internal payload with more informations about measurement and our internal seqNumber

 

2. HW log from device

We need to push some data from device, that can’t be acquired from Sigfox or transmitted via message payload. In the log, you can find date, time and location from GPS including heading and speed, accelerometer data (min and max) so we can determine device orientation and movement during measurement, internal temperature, GSM signal strength and batter level.

 

3. Sigfox GEOLOC callback

  • device, time, duplicate, snr, rssi, station, lat, lng, radius, seqNumber

 

Device, seqNumber and time are once again used to calculate our internal measurement ID to match the data with uplink callback.

Lat and lng are used to get Sigfox approximate location of the measurement. This location is compared with real GPS location if available.

 

4. After GEOLOC callback or around 1 minute after UPLINK callback

Dashboard will make API request to /api/devices/XXXXXX/messages?oob=true to fetch informations about all base stations from last measurement (dashboard will match the correct message by seqNumber, date and device id).

At the same time, /api/coverages/global/predictions API is called to fetch coverage prediction for the real GPS location of device (if already available, or background task will wait few minutes and tries later).

 

5. Reverse geo-coding

Once all the callbacks and HW log upload are completed, background task will try to translate GPS location to street address using Open Street Map APIs (or cache if we already know the address for that GPS location).

 

6. Batch measurement processing

Another background task ie executed to double check that batch measurements are grouped properly and recount some statistics from received datas. Also total number of messages in batch is checked and recounted if needed.

 

7. Last fix task

Another safeguard background task is here to double check that all data were delivered. If GEOLOC callback was missed, API calls are executed. If UPLINK and GEOLOC callbacks were missed, measurement with “no sigfox coverage” is created from HW log received from device.

Sigfox API used

/api/coverages/global/predictions

Used to get coverage prediction for location of measurement. Dashboard will compare this prediction to real measurement.

Used params:

  • lat
  • lon

Expected response:

  • locationCovered
  • margins

 

/api/devices/XXXXXX/messages?oob=true

Used to fetch message and details about all base stations that received the message.

Used params:

  • device ID (in URL)
  • oob (set to true)

Expected response:

  • seqNumber (to match right message)
  • rinfos (to fetch all the base stations infos)
  • linkQuality 

 

/api/devices/XXXXX

Used once a week to update registered device info (PAC, sigfox name, etc…)

Used params:

  • device ID (in URL)

Expected response:

  • pac
  • name
  • averageSnr
  • averageRssi
  • computedLocation
  • Last (last message date and time)

 

Sigfox callbacks

UPLINK callback

This callback is used to get first message from measurement.

 

GEOLOC callback

This callback is used to get GEOLOC information from Sigfox. Also, this callback will execute background task that will fetch data from Sigfox API (/api/devices/XXXXXX/messages?oob=true) to get all the base stations data and coverage predictions (/api/coverages/global/predictions). Few seconds later, another task that will make reverse geo-coding of the GPS location.

 

HW log upload

After the measurement (or manually later when there is no GSM), CheckFox device will connect to the dashboard API via GSM and send a HW log with additional data.