Tag Archives: sigfox

Africa

Does IOT will be the next leap for Africa ?

What is really exciting with new technologies is that some evolution can be sometime revolution, especially in Africa. Cell phone for instance, took a long time to evolve in Europe, from early attempt (‘Radiocom 2000’, BeBop in France) to GSM, and then UMTS. In most of Africa countries, which were totally uncovered with fixed phone, GSM and UMTS was a technology gap: 40 years has been catch up, and now most of the African countries are well covered, and people have probably a better access to telecommunication than electricity! I am quite sure that in many of top African cities there much more smartphone per habitant than in Europe.

This jump generated a lot of creativity in related services, the biggest one being mobile money, which is much stronger in Africa than in any other continent. But there are plenty of others services, mainly SMS based.

I think that that it will be the same for the Internet of things, or connected object. With new innovations coming in this space, and due to the current status of ‘connectivity’ in Africa, and thanks to the fact that low bandwidth technologies like Sigfox or LoRa will reduce connectivity costs.

Some area that could really boom with IOT :
Agriculture : This is usually the biggest part of the economy, with numerous smaller actors. Low cost object will be useful to provide feedback on fields parameters, for self-system irrigation for instance.
Government infrastructure: it’s very hard to monitor all infrastructures deployed, and due to hard climatic condition there is usually a fast degradation. IOT could help them to monitor such infrastructure and be warned when they need to do something.
Security : security is usually a big problem in emerging country. Connected object will allows to provide real time position of persons and goods (like containers, trucks, …) and will allow to trigger alarms that informs of an immediate danger.
Medical : usually poorly developed, connected object would help to provide real time information on patients, and could allows remote infrastructure to be better handled.

Even if the relative price of connected object will be high compared to the average salary, the added value in these countries is much higher than in many of eastern ones.

I think that African government should support efforts in this direction, and push operators to deploy the needed infrastructure to cover all rural area, and this will push forward Africa in the 21st century.

Of course, there are plenty of related challenges, the biggest one being the access to the electricity but momentum is here.

First SigFox program with Arduino (Akeru)

Following my previous post, I’ve started to explore Sigfox capacities with a small first project. The idea was to make a low powered GPS tracker. So I’ve just added a 10€ GPS adapter from China and wrote my first sketch.
The idea is to make a simple GPS Traker, ideally not using SMS but being able to send his position from anywhere, with of course very low energy consumption. This first version is just a proof of concept so we are not yet focused on the consumption. The data are then send to the OpenSensorCloud platform (feel free to register! )

photo(2)

The programe is quite simple:
1. initialize everything
2. wait for the GPS to get fix position
3. send it to server through Sigfox network
4. wait 10 min
5. start at 2)

We need to wait 10 minutes before sending another 22 bytes messages, it’s a Sigfox limitation and the tradeoff between low consumption, high coverage, and size. I don’t see this as a big issue for many usage, but for sure, it will add some interesting challenges

In short:

// include the library code:
#include <Akeru.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>

// initialize the library with the numbers of the interface pins
TinyGPS gps;
SoftwareSerial ss(8, 9);  // GPS RX is set on pin 8

void setup() {

  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  Akeru.begin();  // Not sure it's neded, as I need to call it again later
  delay(1000);
  ss.begin(9600);
  // Init modem
  delay(1000);
}

// int is 16 bits, float is 32 bits. All little endian
typedef struct {
  float lat;
  float lon;
  float alt;
} Payload;


void loop()
{
  Payload p;
  float flat, flon;

  gps.f_get_position(&flat, &flon, &age);
  p.lat=flat;
  p.lon=flon;
  p.alt=gps.f_altitude();
  
  if(flat==TinyGPS::GPS_INVALID_F_ANGLE){
    delay(1000);
  }else{
    // Note Seems that we need to call Akeru.begin() again or
    // further call to isReady or send will be blocked...
    delay(1000);
    Akeru.begin();
    delay(1000);
    Serial.println("is ready:"+String(Akeru.isReady()));
    Serial.println("Sending");
    bool status=Akeru.send(&p,sizeof(p));
    Serial.println("done result:"+String(status));
    // Wait for 10 minutes before sending another one
    for(int i=0;i<600;i++){
       delay(1000);
    }
    Serial.println("wake up");
  }
}

Of course, the program need some improvements, like waiting to have more satellite fixed before seding the first message, but let’s keep it simple.

The full source code is available

I had some minor issue, it seems that the Akeru API needs to be “reseted” before sending new data

The payload is quite simple, just a structure with three float: lat , lon, and alt (the last one might not be the most interesting but it was just a test).

The most interesting things is that now opensensorcloud support Sigfox devices. Sigfox allows you to send data in a limited way. You are allowed only 22 bytes per message, so no way to do ascii or json. So you usually send binary information, typically raw C or C++ structure. Then you have to decode them on the server.
Hopefully, OpenSensorCloud provides full support for such feature:
When creating a sensor for an Akeru enabled device, you just need to specify the format of the payload, this will be automatically converted to corresponding sensor values.
SigFoxConf

Make sure that your sigfox device id is well defined
Format are described in a generic json way, for instance, in may case, the payload contained 3 float field, so format is the following:

[
  {'name':"lat",'type':'float'},
  {'name':"lon",'type':'float'},
  {'name':"alt",'type':'float'}
]

As I wanted to map this to a “Position” object, and not to thre sensors, I ad to add a little bit of definition


[{'name':'pos',
  'type':'position',
  'struct':[
   {'name':"lat",'type':'float'},
   {'name':"lon",'type':'float'},
   {'name':"alt",'type':'float'}
  ]
 }
]

As a Sigfox callback, put the URL of the OpenSensorCloud callback, like this

http://api.opensensorcloud.com/device/sigfox?api_key=YOUR_API_KEY


Replace with the value of the platform.
OpenSensorCloud expect two extra parameters: device value, with the device_id you’ve just entered before, and data with the binary payload.

The API_KEY is visible on your profile,
And let’s go

The map location appears on the platform

You can see the result on the
Real Time Dashboard live
capture

In next part, we will add geofencing and twitter features thanks to the Trigger functions of the OpenSensorCloud platform…

Akeru board completed

Akeru unboxing!

SigFox logo
Juste received my Akeru board from Snootlab today, and here are my first reactions. Akeru is a Arduino with a SigFox chip inside, allowing to send (small) messages – shorter than sms – but with very low poswer consumption.

Here is some screen shot of the kit: looks nice, close to a Uno, but need a little bit of soldering

photo 3

photo 2

A few minutes later, it’s done, the board is up and ready to be plugged.

Trying to follow the instruction of Snootlab, I’ve downloaded the FDTI drivers, and connect the board, and….nothing happens….no led blinking, nothing

So I started to investigate: in fact, it appears that the driver for mac seems to have a lot of problems. I need to plug/unplug several time to start the usb driver. But even, the board was not visible.

So I used a PC to do the same manipulation. Good news, the board was recognized, and wake up, and I was able to program it but the driver was very unstable, I had to plug/unplug several time to program the board.

But finally, I was able to do it, and to send my first message to the Sigfox network and receive it to . I still need to use the Snooplab proprietary gateway (actoboard) which is quite limited: it can not pas directly the raw SigFox message as raw data, you need to specify one and only one format, which is not very practical.
Also, there is no statistic about your usage. You should not send more than 140 messages a day but there seems no indication of your daily usage. Beyond the 140 messages, your are limited but also you have to paye some “proportinal penalties”, which seems to be contrary to the limitation.

But back to the Mac , impossible to make it works: the driver have problems to load, and even when the loaded, the card was not recognized. So the bad news is that I can not program it using my everyday computer (MacBook air, OS X 10.9.2) and I have to go back to the PC

So I’ll start to play a little bit with it, and keep you updated with the results!