Technology used to run the CheckFox dashboard

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

KEY NAME KEY DESCRIPTION LICENSE
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 messages
OPT_INTEGRATOR in order to see IDs of base stations and repetitions
COVERAGE TOOL in order to see and use the global coverage API
OPT_STATION_LOCATION (for Sigfox Operators to see locations of BTSs and distances)

How the data is collected (and where)

1. Sigfox UPLINK callback

"device":"{device}",
"time":"{time}",
"data":"{data}",
"seqNumber":"{seqNumber}"

2. HW log from device

Some additional data we need to get from the device cannot be acquired from Sigfox or transmitted in the message payload. In the CheckFox HW log, you can find date, time and location from the GPS including orientation and speed, accelerometer data (min and max values) so we can determine device orientation and movement during measurement, internal temperature, GSM signal strength and battery level.

3. Sigfox SERVICE_DATA ADVANCED callback


"device":"{device}",
"time":"{time}",
"data":"{data}",
"seqNumber":"{seqNumber}",
"lqi":"{lqi}",
"fixedLat":"{fixedLat}",
"fixedLng":"{fixedLng}",
"operatorName":"{operatorName}",
"countryCode":"{countryCode}",
"deviceTypeId":"{deviceTypeId}",
"computedLocation":{computedLocation}

    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.