Let’s start playing with sigfox technology

SigFox with TD1208I already wrote some stuff about Sigfox here, so may know that it is a really promising French technology IoT oriented. So I have a project to connect a Raspberry Pi and arduino system on a such peripheral.  The use of this technology is quite easy as it works like a modem, based on AT command transfered over a 9600bps serial line.  The main issue is that the chip is really CMS and hard to hack at home easily… by the way, as you see, a poor soldering makes it working for the test purpose.

As much as I have test, I can say that using this device to communicate with an Arduino or a PI is really easy ! code can be written in less than a minute ; compared to what you have to do to make wifi / Ethernet / GSM working in a stable way, this is incredibly easier ! You can also use the device as an autonomous sensor for temperature and contact switch of your choice for an affordable price.  In my point of view one thing is missing : you do not really know the signal quality and if you have a good connection or not with sigfox network. [update] The RSSI is indicated in the SigFox Api on the backend side for each of the received messages [/update] . Meaning you must receive the first one to know if the location is covered or not. This can be a problem to deliver a product and get an easy support to your consumer. The other limit of the technology, as much as I know is that you can transmit data but not receive some from the SigFox network [update] The ability for the device to receive messages will be soon added with limitation, but it will [/update]. In many case it is enough but sometime you like to respond to a specific value received. Read next to get details on how to use it …

First step – Hardware stuff

The first step is to get the appropriate datasheet, this link is the right place to get the last one ! The schema to connect the TD1208 chip to the processor serial port is the following one :

TD1208 typical application
TD1208 typical application

RX signal is connected to TX on arduino or FDTI.

TX signal is connected to RX on Arduino or FDTI.

Personally I started to connect the TD1208 on a fdti cable to use it over USB on my Mac or my raspberry pi quickly.

Just have to be carefull, USB is delivering 5V power supply and this device is based on 3.3V.

Once connected, we just have to connect over the serial port and send some data !

Second step – Let’s make fun with AT cmd

Over a terminal session, it is possible to communicate with the chip. Basically typing AT will return OK. This is a good starting point. By default, device activate ECHO so you do not need to activate the local ECHO in the terminal.

Next try is to check versions : AT&V

AT&V

Telecom Design TD1208
Hardware Version: 0F
Software Version: SOFT1198
S/N: 0000XXXX
ACTIVE PROFILE
E1 V1 Q0 X1 S200:0 S300:24 S301:2 S302:14 S303:1 S400:000000 S401:FFFFFFF S402:0 S403:869312500 S404:14

OK

Third step – Let’s understand own to works

First thing to know is that this ship can be used for multiple usage :

  • The first one is named LAN and is a Local Area Network, it means that 2 (or more) TD1208 can communicate over the 868MHz channel with a speed of 9600bps.
    • In this mode you can have up to 15 devices and one of them is a gateway.
    • One TD1208 is a gateway, gateway basically echo the messages
    • The others are Devices that have to register to the Gateway
  • The second mode is SigFox, it allows a worldwide communication using the SigFox network.

The device can be configured as Gateway, Device or Transmitter ; this last mode is a standalone mode where the device is sending message over SigFox network. To get the device mode you can use ATS500? for example ; 02 means Transmitter.

The module includes some sensor, it can be automatically programmed to send alert of values measured on these sensors. This means it could be used as an autonomous circuit to monitor temperature for example.

The AT command to get these informations are

  • ATI26 : gives temperature in celcius (as much as i’ve seen it is not really precise)
  • ATI27 : return voltage in V

The At command list is accessible with AT? command

Fourth Step – Upgrade firmware

The firmware can be upgraded over the serial line. Unfortunately this can only be done on Windows … but I assume it is easy to revere engineer it ; things I’ll take a look later, as once you have deployed it on an embedded device you generally do not really want to move it to upgrade it … by the way just start the tool provided on the chip home page and the last firmware. Do not forget to choose the right chip and wait a short time. It’s done !

Fifth Step – Send the first message over SigFox

Sending a message on SigFox network is really easy : you just need to send the bytes over the AT interface :

AT$SS=00 01 02 03 04

OK

This command has sent the 5 bytes {00,01,02,03,04} over the network. The message length is a maximum of 12 bytes.

sixth Step – Now receive the sent message

This part is the more complicated in fact as you have to registered the device in the TelecomDesign cloud or the SigFox backend.

Once registered (frankly speaking, you need to be a professional to register your device or going through an integrator/distributor), you have access to the SigFox backend, here you can follow all your sensors activity, message received, rssi :

sigfoxbackendTo proceed your message automatically on your own back-end, you can configure a Callback for a device. This callback is an url , owner by your application, that will be call each time a message is received. I’ll describe in a later article how to build an end-to-end example.

Next Step & next articles

One of the big advantages of this chip, as I said is that you can easily connect it to an Arduino or a raspberry Pi, but, instead of using an arduino, you can also build your own firmware and makes want you want based on the GPIO, I2C and ADC available on the chip. As the embedded arm core is more powerful than most of the arduino, it could be a good deal and allow to design really low cost sensors.

The chip is managing sleep mode and is based on low power component. As the transmission is really rare and short, the device life on battery should be really interesting to study.

The last point I need to clarify is how to get message from the SigFox cloud to the device, according to documentation is a capability of sigfox but reading the API, I do not see a lot of information 🙁

 

 

 

 

 

This entry was posted in IoT, Sigfox and tagged , , , . Bookmark the permalink.

24 Responses to Let’s start playing with sigfox technology

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.