A few weeks ago ekito has been invited to the first SIGFOX VASP training day at their headquarters in Labège, near Toulouse.
SIGFOX is an IoT (Internet of Things) network provider with a dedicated wireless network that makes it surprisingly easy to connect Things to the Internet. SIGFOX claims to have already full network coverage in France and now seeks to build up its network in other countries.
As participants of the VASP training day, we had the chance to take home some trial kits to make up our own mind.
About connecting IoT devices
The particularity of IoT is that sensors send very little information at very low data rates. For example, a thermometer can send a measurement once a minute. The temperature value itself can be encoded in very few bytes. No headers, no XML tags, no special syntax like JSON is required.
By today’s standards this is incredibly little information but enough to make this one little Thing worthwhile. Now imagine a swarm of thousands or even millions of these little sensors, each one providing very little bits of worthwile information. We get a big picture at an incredible resolution. The possibility to federate these little Things, I believe, is the real power of IoT.
One can take the analogy of modelling a truck load of sand. Up to now, the load of sand had been modelled as one wholesome entity. Now the load of sand can be modelled grain by grain.
Considerable breakthroughs have been made in modeling, storing and analysing large amounts of data, commonly referred to as Big Data. However up to now, with respect to IoT, one piece in the chain was missing: The ability to easily and cost-efficiently connect very large populations of sensors to the internet.
SIGFOX provides this enabling technology for IoT applications, connecting all those little worthwile things and as such creating incredible new types of applications.
What exactly does SIGFOX offer?
SigFox provides access to a dedicated long distance highly sensitive low data rate network. A maximum of 12 bytes of information can be transmitted per data burst, every 10 seconds. Sigfox provides to its customers a radio modem chip for integration with their IoT appliactions. The chip is called TD1202. It is manufactured by the french company Telecom Design from Bordeaux.
The radio modem sends data bursts to base station antennas. Ideally a signal is picked up by more than one antenna. The data packet is demodulated in the base station and then sent to the sigfox data center. In the data center, packets received from the same device through several antennas are de-duplicated. The data center then forwards received data to service subscribers via registered REST-style callback web services.
Subscription fees to the service depend on the number of registered devices. They can be as low as 2€ per device per year.
Examples of Use Cases
SIGFOX also showed us some current use cases, such as services to know the available parking lots in a city; or a monitoring solution for the SNCF (the French national railway) to check the vibrations by putting sensors on the rails.
So SIGFOX covers all France?
Well not quite – yet. While the network seems to have good coverage around all major cities, some blackspots still exist in rural areas. We tested SIGFOX from our office in the city centre of Toulouse and from the homes of three of our colleagues situated in rural areas around Toulouse. All tests have been executed indoors with the following results:
- Toulouse, Place de la Bourse (ekito HQ) – ok.
- Caraman – ok.
- Cintegabelle – ok.
- Gaillac – not ok.
This map shows our test results.
I have presented our results to Thomas Nicholls. He pointed out that SIGFOX recently signed a contract with TDF, a french radio antenna operator, with the objective to deploy more antennas and make their network more dense and reliable.
Now that you have an overall understanding of the SIGFOX solution, we will walk through a little hands on with the starter kit.
The kit comes with a breakout board, housing the TD1202 chip, an antenna connector, an FTDI programming cable connector and another female PIN connector for hardware integrations with external boards, such as Arduino or Rasperrry Pi.
First, attach the antenna and connect the kit to your computer with the provided FTDI – USB cable. Be careful to plug the FTDI cable the right way around into the breakout board. The black cable goes with the pin on the left marked “FTDI BLACK”.
Make sure there is a serial terminal program installed on your Computer.
In MacOS and Linux use the screen utility. In Windows use putty. Here are the install instructions for each operating system:
Install screen with:
$sudo apt-get install screen
screen should already be installed.
Download and install the FTDI driver that can be found at http://www.ftdichip.com/Drivers/VCP.htm.
Download and install putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
Install the FTDI driver. Plug in the cable connected to the breakout board. Then wait for the driver to install automatically. A new emulated COM port should appear, in “System Peripherals”, usually COM3.
On your computer, open a serial terminal. General connection parameters are:
9600 baud, 8 bits, 1 stop bit, no parity, no flow control
$ sudo screen /dev/tty.usbserial-FTG5H1ES 9600,cs8,istrip
Note: the device could be different, just run a ls -rtl /dev/tty* in a terminal and check for something containing “usbserial”.
$ sudo screen /dev/ttyUSB0 9600,cs8,istrip
Note, you might not have the rights to access to your USB device. This was the case with my computer. That’s why I start the terminal as super user.
In Windows, start putty and use the configuration shown in the two screen shots below:
Once the serial terminal is started, check that you can communicate with the radio modem by typing the following AT command:
This should return something as follows:
Telecom Design TD1202 Hardware Version: 0F Software Version: SOFT1117 S/N: 0000580A ACTIVE PROFILE E1 V1 Q0 X1 S200:0 S300:24 S301:2 S302:14 S303:1 OK
Ok, the serial communication between your computer and the radio modem works. We just asked for some system information. The device’s serial number (580A), displayed in line 4, will be of use later on.
Now we are ready to send a message. Lets send the typical “Hello World” message. Messages are sent in binary format. So “Hello World” needs to be translated into a sequence of hexadecimals, each one representing the ASCII character of the letter in question. The website http://www.asciitohex.com/ does this very well for us. The resulting code is 48 65 6c 6c 6f 20 57 6f 72 6c 64.
The message can be sent with the following AT command:
After a few seconds, the terminal should return with:
To check that the message arrived at the backend server, I log into the SIGFOX management console with the credentials provided with the starter kit. From there I browse to see received messages for device 580A.
As you can see, the message has been well received with a respectable signal strength of 16.4dB. What’s neat is that our litttle message has been decoded. It reads as expected “Hello World”.
A more sophisticated trial
My colleague Arnaud Boudou connected a starterkit to his Rasperry Pi in order to monitor battery voltage. The result is pretty impressive and can be seen on his web site. Arnaud also integrated his Rasperry Pi using the USB/FTDI cable. He registered a callback web service that is called every time a measurement is received from SIGFOX. Statistics on his page are updated accordingly.
The Rasperry Pi source code for communicating with the SIGFOX modem can be found in https://github.com/aboudou/picheckvoltage. The following code snippet from main.py illustrates how the voltage reading is sent to the SIGFOX network:
# Push data to SIGFOX network if SIGFOX_ENABLE == 1: if sigfoxPush % (SIGFOX_PUSH_RATE / REFRESH_RATE) == 0: import datetime today = datetime.datetime.today() sigfox.write("at$ss=" + sigfoxData().encode("hex") + "r") if DEBUGMSG == 1: print today.strftime("%Y-%m-%d %H:%M:%S - Sent to SIGFOX: " + sigfoxData().encode("hex") + " a.k.a " + sigfoxData() + "(V) in hexadecimal") sigfoxPush = sigfoxPush + 1 # You don't want the counter to become too big if sigfoxPush > (SIGFOX_PUSH_RATE / REFRESH_RATE): sigfoxPush = 1
The following data callback has been registered at SIGFOX, making it forward received battery voltage measurements to Arnaud’s website:
With our hands-on session here at ekito I can conclude that SIGFOX fulfils its claim of being an enabling technology for IoT solutions. We will certainly continue our experiments to build up some more experience with it.Google+