Blog Home Ultra Narrow Band Networks for the Internet of Things

Getting GPS UTC Time and Date, Speed and Course with new sme-se868-a-library

by Gabriel de Fombelle

Posted on July 21, 2016 at 11:45 PM

SmartEverything Telit SE868-AS GPS System

This is post is the first of a set I will be doing about how using the Telit sms-se868 GPS api and sending data over Ultra Narrow Band networks or generally speaking such networks that carry small packets of data. These articles will particularly focus on programming the SmartEverything board connected to the SIGFOX Network. It will provide also examples using other hardwares in a short future.

The original sms-se868-a library (available here) provided with the SME development and prototyping board, did not allow programmer to get data such as UTC, speed and course.
As these data are necessary to most of GPS development (GPS is one of the most accurate and reliable data source for time), I decided to dive into the sme-se868-a-library lib and make the additional code. The source code should be available soon on the ameltech github account); if not updated at the time you need it you can get it directly from mine.I recommend to get it from the ameltech github as they bring improvments to the library on a regular basis
I provide here below example to work with the new version of the library.

Additional features to the original ameltech sme-se868a-library: TO GET UTC TIME, SPEED AND COURSE

  • unsigned int getUtcHour();
  • unsigned int getUtcMinute();
  • unsigned int getUtcSecond();
  • unsigned int getUtcSecondDecimals();
  • unsigned int getUtcYear();
  • unsigned char getUtcMonth();
  • unsigned char getUtcDayOfMonth();
  • double getSpeedKnots();
  • double getCourse();
  • sl868aCachedDataT getData();

These methods are very atomic. I deliberately chose not to propose more compact ways to get the time in a format known to not force the use of another library like "time.h"; it is up the the programmer to assemble these pieces of date and time in the appropriate format for him. Nevertheless I have made available the getData() method to obtain a single query to the integrated circuit GPS all available data from it. The data returned by getData() is a sl868aCachedDataT struct : typedef struct {
uint16_t lat_deg; uint32_t lat_decimals; // always 6 digit, measurement = 1/100000
uint8_t lat_direction; // 1= north/+, 0 = South/-
uint16_t longit_deg;
uint32_t longit_decimals; //always 6 digit, measurement = 1/100000
uint8_t longit_direction; // 1= East/+, 0 = West/-
uint16_t altitude;
uint8_t quality;
uint8_t n_satellites;
// add time data here below
uint8_t utc_hour;
uint8_t utc_min;
uint8_t utc_sec;
uint16_t utc_sec_decimals;
uint16_t utc_year;
uint8_t utc_month;
uint8_t utc_dayOfMonth;
double speed_knots;
double course;
So to simply build a date time you have just to fill the fields of a struct tm (time.h) with those you get from getData().


the example is available here as an Arduino project - you need to install SmartEverything Board first.

Next post

I will be doing very soon a post on how to pack gps data (and other) as much as possible to be carried by a UNB network such as SIGFOX using a new library

Get sources code and examples


by Gabriel de Fombelle

Posted on Avril 15, 2016 at 18:00

SIGFOX loves Makers

As an IoT solution architect and developper, I recently decided to focus on the new and first really available ultra narrow band solution provider on the market : Sigfox. I have to say how supportive and proactive Sigfox team has been behaving from the very first tweet I posted to get the very basics to start. They answered immediately even on Sunday! Then a few days later they invited me to attend to Sigfox Makers tour near to my place in Bordeaux, no need to trip to Paris or London. During that half day we got this kind of seminar that engineers/makers may dream of: theory , then practice with real programming with a beautiful development card (SmartEveything)

SIGFOX Briefly

In a few words SIGFOX is a ready to use, low energy, low cost, radio network suitable for Internet of Things using Ultra Narrow Band 868 Mhz in Europe (902 Mhz in USA). It is designed to carry short status messages of 12 bytes each with a maximum rate of 140 messages per day, according to European Duty cycle rules. This kind of network is mainly design to uplinks (modem to server) but support also downlink. In any cases the communication is instigated by the device (i.e. no push)
SIGFOX is available almost everywhere in France and in other countries.

Uses cases

Such a network is perfect when : "no user", "no power", "no sockets", "no local network" - it is particularly suitable for "shy devices" carrying only useful data.
Utra narrow band networks are good at telemetry (water, gaz, etc.), for addin to existing devices such as counters, sensors, hydrants, parking, defibrilators.
They also are ok for Tracking good or equipment (associated to GPS and/or accelerometer), after-theft solutions, monitor industrial and construction site equipement, fail alerts, schedules maintenance, battery loads, etc. There are additional uses cases in many various fields: button-action application, kid monitoring, health monitoring, fall detection, tracking community subsidized devices usages, Agriculture: soil and crops monitoring, cattle tracking, non-profit applications, ... and your own use cases.

Open Ecosystem Hardware

SIGFOX has an open hardware policy, so there are plenty of transceivers available as SOC, module, breakout, or developement cards.

Quick set-up and prototyping

Prototyping an SIGFOX based application is pretty easy - Modems provide AT commands, there also several C/C++ libs ready to use on friendly development platforms such as Arduino.
SIGFOX provides a backend service that gather all messages where you define rules, with email template and/or call-back-urls


When talking about connecting devices to servers, whenever there is no local network available, we usually focuse on GSM or 3G networks as there was no other possibility until now. In some situations we also rely on SMS as backup (using the voice network) available almost everywhere. Now we have UNB networks really available like SIGFOX, the two approaches UNB, GSM must be considered.
Each use case should be a detailed study and take into account the following aspects:

  • Amount and frequency of data to exchange between server and devices
  • Size in bytes of each message
  • Need to push data from the server to the device
  • Power consumption
  • Cost per message, Roaming costs, Set-up and provisionning cost
  • Cost of related hardware
  • Cost of package-overruns
  • Coverage
  • UNB can also be considered as backup of GSM in some cases.
Contact us for talking about your project

Blog Search

Side Widget Well

Ultra Narrow Band networks are the backbone of new Internet of Things projects. SIGFOX is one of the first really available, with a huge coverage and delivering a ready to use solution

Copyright ©, Gabriel de Fombelle