Sigfox Protocol Library for devices

Why a Sigfox Protocol Library?

As a device maker, your interest is in your device and your application. You already know that Sigfox is a good communication solution for your business. What about programming the communication protocol in your device? The Sigfox Protocol Library is the answer. It avoids any burden about protocol implementation.

The Sigfox Protocol Library is an abstraction layer: it hides all the radio protocol details and exposes a set of simple functions. 

If you build your solution with a Sigfox Verified modular design, the Sigfox Protocol Library is already embedded in the module you have selected. If you choose to design customized radio functions in your device, the 'Sigfox Protocol Library Files' section below has all the information on how to obtain the files for your particular need.

Sigfox Protocol Library Architecture

The Sigfox Protocol Library is an abstraction layer. It connects your application software to the radio chipset through the manufacturer's APIs.

Figure 1: Sigfox Protocol Library architecture

 The Sigfox Protocol Library performs the usual features of a communication protocol: 

  • packet formatting, 
  • local functions (especially authentication, cryptography and error checking),
  • communication procedures.

The Sigfox Protocol Library's core API is composed of base and optional features. Base features take care of the frame building and scheduling (in time and frequency), while optional features deal with Radio Configuration support, Downlink support, Secure Element support, etc. 

To make the link between the Sigfox Protocol Library and the hardware components, a set of drivers exists. They perform the following functions:

  • BPSK modulation / GFSK demodulation, which is optimized for each radio chipset characteristics,
  • Non-volatile memory management, which stores parameters and values,
  • Memory Allocation (dependant on each microcontroller),
  • AES encryption feature, which performs authentication and/or encryption functions with or without support, from a hardware AES block,
  • Timer management,
  • Secured memory management (to store the ID, Key, and PAC credentials).

The drivers are dependent on the radio chipset. They make the communication link between the microcontroller running the Sigfox Protocol Library and the radio, MCU chipsets and other hardware elements, whatever the communication channel is. They are developed and provided by the chipset vendor.

Sigfox State Machine

The Sigfox State Machine implements several procedures of the Sigfox radio protocol. It is embedded in the Sigfox Protocol Library and consists of five states. The transitions between the five states give you a flavor of the radio protocol behavior. As you can see, it's simple, really simple!

Figure 2: the state machine embedded in the Sigfox Protocol Library

Sigfox Protocol Library APIs

If your device uses a Sigfox Verified Modular Design or a Reference Design, the Sigfox Protocol Library is already embedded in it. Usually, a wrapper is added by the module manufacturer to comply with its own company's software requirements. When you want to transmit a message over the Sigfox network, you just have to prepare the content of your message and call a function. That's it! 

If you plan to build your own design, you can contact Sigfox to get the latest Sigfox Protocol Library. 

The Sigfox Protocol Library contains:

  • the header files describing the function prototypes,
  • the binary file compiled for the specific microcontroller target.

In addition to the Sigfox Protocol Library, Sigfox may provide device makers with additional software codes called Addons. For example, the Sigfox RF & Protocol Addon is an application which contains test modes. It has to be flashed into your device along with the Sigfox Protocol Library for the execution of the Sigfox RF & Protocol Test.

Sigfox Protocol Library Files

There are three ways to get the Sigfox Protocol Library, as depicted below:

First way

The Sigfox Protocol Library is embedded in Sigfox Verified modular designs.

This solution is ‘plug and play’, since the Sigfox Protocol Library is integrated and validated with the manufacturer's API.

For all available references, check out the Sigfox Partner Network.

Second way

Most of our semiconductor partners deliver the Sigfox Protocol Library either online (included in a SDK) or directly flashed in their SoC (System on Chip).

In both cases and as in the first way above, the Sigfox Protocol Library is delivered with the manufacturer's API. However, unlike the first way, the RF and Protocol testing is mandatory when designing a device with a chip-on-board approach.

Third way

If none of the above fits your project, Sigfox proposes a ‘Library Integration Package’ service. You can buy it on a per-product basis from your Build dashboard.

The service includes:

  • The complete Library Package: binary and header files,
  • Interactive support sessions to help you integrate the Sigfox Protocol Library on your hardware.

With this approach, the Sigfox Protocol Library comes alone. The manufacturer's API implementation remains under your responsability.

Sigfox Protocol Library offers