The STSW-S2LP-SFX-DK is an evaluation SW package for Sigfox networking with the S2-LP high performance, ultra-low power
RF transceiver. It is designed to operate in the majority of radio configuration zones (RCZ) described by Sigfox.
The STSW-S2LP-SFX-DK SW package supports the STEVAL-FKI868V1, STEVAL-FKI868V2, STEVAL-FKI915V1, X-NUCLEO-
S2868A2 and X-NUCLEO-S2915A1 kit platforms.
In addition, the package includes the STDES-MONARCH, the STEVAL-FKI001V1 and support for the STEVAL-IDB007V2 and
STEVAL-IDB008V2 (kits to be used in conjunction with the shields included in the above mentioned kits). The latter solution
enables the support for BlueNRG1/2 System-on-Chip alternatively to the STM32 microcontroller.
It provides an S2-LP Sigfox library with a complete set of APIs to develop embedded applications.
The S2-LP - Sigfox Demo GUI PC application provides an interactive interface to transmit messages to the Sigfox network and
program the STEVAL-FKI nodes with the Sigfox ID to set the node for network communication.
For details regarding the BlueNRG-1/-2 hardware and software development kit, refer to STSW-BLUENRG1/2-DK.
UM2169 - Rev 7 - September 2020
For further information contact your local STMicroelectronics sales office.
www.st.com
1Sigfox S2-LP kit content
The package includes:
•the Sigfox Demo GUI and corresponding firmware to:
–prepare the board with ID/PAC/Key from the pool assigned to ST devices (see Section 4 Demo
description)
–run a demo that transmits user defined messages to the Sigfox network (see Section 5 Push button
demo description)
•a framework to develop embedded Sigfox-enabled applications, with examples in the source code.
•an application note which describes the Sigfox firmware framework based on the S2-LP transceiver and on
both STM32 MCU and BlueNRG1/2 SoC, with guidelines on how to develop solutions that are optimized for
power.
•the Sigfox Flasher, a tool and related software APIs to store Sigfox credentials and manufacturing calibration
values (frequency offset and RSSI), in a secure way, into the MCU internal Flash.
UM2169
Sigfox S2-LP kit content
UM2169 - Rev 7
page 2/32
2Requirements
2.1Hardware requirements
A Windows® PC with:
•2 USB ports
•135 MB free hard disk space
At least one of the following ST evaluation kits:
•STEVAL-FKI868V2 or X-NUCLEO-S2868A2 (for RC1, RC3, RC5 and RC6) kit with STM32 Nucleo-64
development board or STEVAL-IDB007V2/IDB008V2 board
•STEVAL-FKI915V1 or X-NUCLEO-S2915A1 (for RC2 and RC4) with STM32 Nucleo-64 development board
or STEVAL-IDB007V2/IDB008V2 board
•STEVAL-FKI001V1 development kit
2.2Software prerequisites
•Microsoft Windows 7 or later
•Adobe Acrobat Reader 6.0 or later
•BlueNRG-1 ST-LINK-Utility
•STM32CubeProgrammer
One of the following integrated development environments (to develop embedded Sigfox-enabled applications):
1.IAR EWARM 8.32.1 or later
2.Keil MDK-ARM µVision 5.17 or later
UM2169
Requirements
UM2169 - Rev 7
page 3/32
3Board registration
3.1ST-side registration
This registration procedure has to be performed only once via the ST GUI.
Step 1.
STM32STEVAL-FKI001V1
Connect the STM32 Nucleo-64 development board to a PC
via USB. Windows should automatically recognize the board
as a hard drive
Figure 1. NUCLEO disk drive
UM2169
Board registration
Connect the STEVAL-FKI001V1 development board to a PC
via USB and connect an ST-Link programmer to the
JTAG/SWD connector.
Step 2.
STM32STEVAL-FKI001V1
Flash the development board by simply dragging the
appropriate bin file (in the Binaries/Sigfox_CLI_Demo_Project
folder) to the NODE drive. Choose the bin file according to
your STM32 Nucleo-64 development board:
–SIGFOX_CLI_DEMO_NUCLEO_XX.bin
Open the BlueNRG-1 ST-LINK Utility and flash the
development board by simply dragging the
SIGFOX_CLI_DEMO_FKI001V1.hex file (in the Binaries/
Sigfox_CLI_Demo_Project folder) into the application window
and select [Target]>[Program] and then press [Start].
UM2169 - Rev 7
page 4/32
Step 3.Open the ST Sigfox GUI and the COM port associated with the development board.
Figure 2. Sigfox Demo GUI main window
UM2169
ST-side registration
UM2169 - Rev 7
page 5/32
Step 4.Click on the [Open] button.
If the board does not contain Sigfox data, a Board Preparation wizard appears.
UM2169
ST-side registration
Figure 3. ST Registration procedure 1/3
UM2169 - Rev 7
page 6/32
Step 5.Click the [Next] button
You will be prompted to complete a short form with your:
–name
–company name
–e-mail address
–radio configuration zone (RCZ) number
Note:You must specify the correct RC zone to avoid generating an incorrect ID. Please refer to https://
build.sigfox.com/sigfox-radio-configurations-rc for the updated list of Sigfox Radio Configuration (RC) zones.
Figure 4. ST Registration procedure 2/3
UM2169
ST-side registration
UM2169 - Rev 7
page 7/32
Step 6.Click on the [Generate mail] button
A window appears with the e-mail data you need to send.
UM2169
ST-side registration
Figure 5. Generated mail pop-up
Step 7.Send an email with the Destination Address, Subject and e-mail text shown in the popup window
You will receive an answer (at the e-mail address you specified previously) with an activation string
Step 8.Paste the activation string you receive in the text box and click Next
Figure 6. ST Registration procedure 3/3
UM2169 - Rev 7
page 8/32
Step 9.If the activation string is correct, the board is programmed with the Sigfox account data and the ID and
PAC is shown on the final page
The board is now ready and you can register the board in its own Sigfox backend
3.2Sigfox side registration
Visit https://buy.sigfox.com/activate for ST development kit registration.
Step 1.Insert the country where the board should operate the ID and PAC of the board.
Step 2.Then fill a form to obtain an account on the sigfox backend.
An e-mail will be sent to the specified e-mail address.
Step 3.Choose a password and sign in to its own backend from https://backend.sigfox.com.
Step 4.Go to the DEVICE section.
This section provides a list of registered devices and other data.
UM2169
Sigfox side registration
Figure 7. Sigfox device page
Step 5.Click on the device ID to access a node summary page:
Figure 8. Sigfox device information
UM2169 - Rev 7
page 9/32
Step 6.Click on messages to show a list of all sent messages.
For each message, the following information is shown:
–the date and time
–the data in hex (so if the transmission occurred with the S2-LP Sigfox GUI, the data should be the
transmitted message in hex)
–the location of the node (link to a map)
–a link quality indicator (SNR bar)
Figure 9. Sigfox device messages
UM2169
Sigfox side registration
UM2169 - Rev 7
page 10/32
4Demo description
The demo can run either on a kit connected to a PC running the Sigfox Demo GUI (Section 4.1 Sigfox Demo
GUI ), or on a kit supplied via USB in standalone mode (Section 4.2 Demo without connection to a PC).
4.1Sigfox Demo GUI
After board registration, you can transmit messages using the GUI.
Step 1.Flash the board with the appropriate Sigfox_CLI_Demo firmware, located in the Binaries/
Sigfox_CLI_Demo_Project folder
Step 2.Connect the STM32 Nucleo-64 or STEVAL-FKI001V1 development board to a PC via USB.
Step 3.(For STM32 only) Ensure jumper JP1 (near the USB connector) is open so the PC to assign a COM
port to it.
LEDs LD1 and LD3 on the board should both be lit.
UM2169
Demo description
Figure 10. JP1 position on STM32 Nucleo board
UM2169 - Rev 7
page 11/32
Step 4.Launch the Sigfox Demo GUI on your PC
Figure 11. Sigfox Demo GUI main window
UM2169
Sigfox Demo GUI
Step 5.Click on the TX button to transmit data.
In adherence with protocol, the frame is repeated three times with a 500 ms interval; the duration of
each frame is shown in the Frame duration box.
The frames received by the base-stations are shown in the DEVICE > Messages section of the sigfox
backend.
Note:The maximum length of a message is 12 bytes, as per the sigfox protocol.
Step 6.Check the Ask for response checkbox and then click TX again.
The message is sent with a response request and the transmission is followed by a reception phase of
up to 50 s. The received message is shown in the Messages section of the GUI.
Step 7.To set the response for each device from the sigfox backend, log-in, go to the DEVICE TYPE tab and
click on the device type description.
Figure 12. Sigfox DEVICE TYPE tab
UM2169 - Rev 7
page 12/32
Step 8.Click Edit to change the Downlink data parameters.
Step 9.Check the uC goes to low power checkbox to set the microcontroller in low power mode during radio
transactions.
4.1.1Sigfox Demo GUI menu items
The File menu can be used to access the Demo firmware and Sigfox library version information.
For radio configuration zones 2 and 4, there is also the Set Std Configuration option described in
FCC allows the transmitters to choose different macro channels to implement a frequency hopping pattern
allowed by the standard. These macro channels can be chosen through three 32-bit configuration words.
Each bit of the config_words[0,1,2] array represents a macro channel according to the following mapping:
Table 5. Macro channel mapping - config_words[0]
Macro Ch.1234567…32
Frequency (MHz)902.2902.5902.8903.1903.4903.7904.0…911.5
config_words[0] bit0123456…31
UM2169 - Rev 7
page 17/32
UM2169
Using the command line
Table 6. Macro channel mapping - config_words[1]
Macro Ch.33343536373839…64
Frequency (MHz)911.8912.1912.4912.7913.0913.3913.6…921.1
config_words[1] bit0123456…31
Table 7. Macro channel mapping - config_words[2]
Macro Ch.65666768697071…86
Frequency (MHz)921.4921.7922.0922.3922.6922.9923.2…927.7
config_words[2] bit0123456…21
A macro channel is only enabled when the corresponding config_words[] bit is set to 1. At least 9 macro
channels must be enabled to meet the FCC specifications.
The last argument is an integer representing the sigfox_default_channel. It should be set as follows:
•For RCZ2, the operational frequency should be 902.2MHz and the default channel is 1.
•For RCZ4, it is necessary to keep the 902.2 MHz frequency in the open function but, since the sigfox
operational channel is at 920.8MHz, we need to set the default channel to 63.
By default the GUI uses the following std_config:
Parameter
config_words[0]0x000001FF0x00000000
config_words[1]0x000000000xF0000000
config_words[2]0x000000000x00001F
sigfox_default_channel163
Note:This command is ineffective for RCZ1.
Table 8. Default STD config
RCZ2RCZ4
UM2169 - Rev 7
page 18/32
5Push button demo description
This is an ST-Sigfox demo showing how to use the Sigfox protocol to send a message to a base station each time
the blue button on the STM32 Nucleo board, the button 2 of the STEVAL-IDB007V2/STEVAL-IDB008V2 board, or
the SW1 button on the STEVAL-FKI001V1 is pressed. The payload of the message is a number representing the
number of times the button has been pressed since the last boot sequence.
If something goes wrong during initialization, the green LED on the STM32 Nucleo board or the red lLED on the
STEVAL-IDB007V2/STEVAL-IDB008V2 board will blink continuously.
The root folder of the project is Projects/Projects_Cube/Sigfox_Applications/Sigfox_PushButton_Demo_Project.
The same example is provided both for MDK-ARM Keil and IAR Embedded Workbench integrated development
environments.
5.1KEIL project
To use the project with KEIL µVision 5 for ARM®:
Step 1.Open the KEIL µVision 5 for ARM and select Project→Open Project.
Step 3.Select the desired platoform (STM32 or BlueNRG) and open the project in the EWARM folder
Step 4.Select Project→Rebuild All.
This will recompile and link the entire application
Step 5.Select Project→Download and Debug to download the corresponding binary image.
UM2169 - Rev 7
page 19/32
6Sigfox CLI demo description
This ST-Sigfox demo shows how to use a command line interface (CLI) to send commands which use the Sigfox
protocol to send messages and perform pre-certification tests (for the available commands refer to
Section 4.3 Using the command line).
6.1STEVAL-IDB007V2/STEVAL-IDB008V2 limitations
As described in Section 6.5 BlueNRG-1/2 support, the STEVAL-IDB007V2/STEVAL-IDB008V2 evaluation
boards cannot use the UART and the external EEPROM at the same time, so the EEPROM cannot be used in
this project.
For this reason, in the CLI Project, you should use the define USE_FLASH for the MCU Flash to store credentials
and any other Sigfox nonvolatile data.
UM2169
Sigfox CLI demo description
6.2
Sigfox pre-certification tests
The CLI project includes the SIGFOX ADDON library that allows performing the entire test suite before the official
certification.
The test procedure requires the RSA-SDR-Dongle kit from Sigfox.
Test can be performed calling the node_test_mode command specifying RCZ and Test ID.
Step 4.Select the desired platform (STM32 or BlueNRG) and open the project in the EWARM folder.
Step 5.Select [Project]>[Rebuild All]
Step 6.Select [Project]>[Download and Debug] to download the corresponding binary image.
6.5BlueNRG-1/2 support
The STSW-S2LP-SFX-DK SW package supports the STEVAL-FKI001V1, the Monarch Reference Design and the
STEVAL-IDB007V2/STEVAL-IDB008V2 platforms.
To use them, you have to download and install the latest STSW-BLUENRG1-DK software package from
www.st.com to install the USB-to-serial driver needed for the applications requiring the serial port.
For the STEVAL-IBD007V2 and the STEVAL-IDB008V2 some hardware modifications are also needed to ensure
compatibility with S2-LP evaluation kits.
6.5.1Changes to the STEVAL-IDB007V2 and STEVAL-IDB008V2 boards
To make the STEVAL-IDB007V2 or STEVAL-IDB008V2 boards compatible with the STEVAL-FKI868V2/STEVAL-
FKI915V1 boards, you have to apply some changes to the board, on the bottom layer:
Step 1.Remove R12 resistor.
UM2169 - Rev 7
Step 2.Create a short-circuit between pin 8 and pin 7 of CN3 connector.
Step 3.Remove R25, R21, R19, R16 resistors.
Step 4.Set a short between the internal pad of R21 and R17 resistors.
page 21/32
Step 5.Set a short between pin 6 of CN4 connector and the internal pad of R19 resistor.
Figure 16. STEVAL-IDB007V1/2 or STEVAL-IDB008V2 hardware modifications
UM2169
BlueNRG-1/2 support
6.5.2BlueNRG-1/2 SoC connections for STEVAL-IDB007V2 and STEVAL-IDB008V2
After applying the modifications, the STEVAL-IDB007V2 and STEVAL-IDB008V2 platform pin connection is as
described the following table.
Table 11. STEVAL-IDB007V2 platform pin description with board function
Function
3D
accelerometer
and
gyroscope
JTAG
JTMS-
SWTDIO
JTCK-
SWTCK
UM2169 - Rev 7
Pin
name
DIO101
DIO92
DIO83SPI_CS
DIO74DL2
Pin
num.
LEDsS2-LPButtons FKI_E2PROM
Pressure
sensor
Arduino connectors
CN1CN2CN3C4
pin 1
(IO8)
pin 2
(IO9)
pin 2
(TX)
pin 6
(SCL)
page 22/32
Function
Pin
name
DIO65DL1SDN
DIO57PUSH2
DIO48SCL
DIO39SPI_SDOSPI_SDOSPI_SDO
DIO210SPI_SDASPI_SDASPI_SDA
DIO111SPI_CS
DIO012SPI_SCLSPI_SCLSPI_SCL
DIO1413DL3SPI_CS
RESET25RESETRESETRESET
DIO1329GPIO3PUSH1
DIO1230INT1
DIO1132
Pin
num.
LEDsS2-LPButtons FKI_E2PROM
Pressure
sensor
SDA
(PUSH2
button)
3D
accelerometer
and
gyroscope
JTAG
JTAG-
TDO
JTAG-
TDI
UM2169
BlueNRG-1/2 support
Arduino connectors
CN1CN2CN3C4
pin 7
(IO6)
pin 9
(SDA)
pin 10
(SCL)
pin 5
(MISO)
pin 4
(MOSI)
pin 3
(CS)
pin 6
(SCK)
(NRST)
pin 3
pin 6
(IO5)
pin 5
(IO4)
pin 4
(IO3)
pin 8
(IO7)
pin 1
(RX)
pin 3
(IO2)
pin 5
(SDA)
pin 4
(AD3)
pin 3
(AD2)
pin 1
(AD0)
pin 2
(AD1)
6.5.3S2-LP
The S2-LP is placed in the STEVAL-FKI868V2 and STEVAL-FKI915V1 boards connected to the STEVAL-
IDB007V2 and STEVAL-IDB008V2 through the Arduino connectors (CN1-4) and can be driven by the
BlueNRG-1/2 via SPI.
GPIO3 is connected to the BlueNRG-1/2 wake-up pin used to notify some events.
The BlueNRG-1/2 SoC acts as a SPI master and can be used to configure the device through registers and to
send/receive data to/from the sub-1GHz channels.
6.5.4E2PROM
The E2PROM containing the manufacturing data of the S2-LP board can be accessed by the BlueNRG-1/2 using
the SPI bus.
Important:
Since the EEPROM CS signal is shared with the TX signal of the BlueNRG UART port (IO8), UART and EEPROM should be
used in an exclusive way.
6.5.5Hardware setup
Step 1.Connect a 2.4 GHz antenna to the STEVAL-IDB007V2 SMA connector.
Step 2.Connect an 868/915MHz antenna to the STEVAL-FKI868V2 and STEVAL-FKI915V1 SMA connector.
Step 3.Ensure the jumper configuration on the board is as described in Section 6.5.1 Changes to the
STEVAL-IDB007V2 and STEVAL-IDB008V2 boards.
UM2169 - Rev 7
page 23/32
Step 4.Connect the motherboard to the PC via a USB cable.
Step 5.Verify the PWR LED DL4 light is on.
6.6Sigfox Flasher
Sigfox board information (ID, PAC and KEY) can be stored in the device Flash memory using the
SIGFOX_FLASHER tool included with the STSW-S2LP-SFX-DK package.
Before proceeding, you need to obtain valid credentials from Sigfox (for further details, contact your local
reference for Sigfox).
However, you can use the test credentials for test purposes:
•ID = 0xFEDCBA98
•KEY = 0x0123456789ABCDEF0123456789ABCDEF
The SIGFOX_FLASHER is a tool to setup Sigfox credentials and board information related to Sigfox operations.
The output of this tool is a binary file and, optionally, the information stored in the file can be directly flashed to the
device.
All the examples included in this package can be programmed to read Sigfox credentials from Flash by simply
declaring the USE_FLASH define in the pre-processor defined symbols.
Together with ID, PAC and KEY, other information stored in the Flash memory is related to:
•RCZ
•frequency offset
•RSSI offset
•LBT offset
UM2169
Sigfox Flasher
6.6.1Prerequisites
To save credentials in your device using the tool, ensure you have installed the right version of ST-LINK utility (for
BlueNRG-1/BlueNRG-2 boards) or STM32CubeProg (for STM32 boards) as shown in the table below.
Once installed, check the application path with the one listed in the app.cfg file.
Default values for app.cfg are:
STM_32=C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/
STM32_Programmer_CLI.exe
BLNRG1=C:\Program Files (x86)\STMicroelectronics\BlueNRG-1_2 ST-Link Utility V 2.0.0\STLINK_Utility\BlueNRG-1_ST-LINK_CLI.exe
6.6.2Usage
After receiving your valid credentials, go to the SfxFlasher folder and open a Windows command window.
The SIGFOX_FLASHER tool supports a series of options as listed in the following table.
Table 12. ST-LINK utility and related devices
DeviceSoftware required
STM32STM32CubeProg
BlueNRG1/2STSW-BNRG1STLINK
UM2169 - Rev 7
page 24/32
ParameterDescription
Data
-eEncryption mode: none, fixed, variable
-k key16-byte long encryption key when fixed mode selected
-f [file name]Output file name
-w [address]Write directly in the Flash memory
-sn serial number A specific ST-LINK serial number
A string in the form of ID;PAC;KEY;RCZ;FrequencyOffset;RSSIOffset;LBTOffset
The command in the example generates the myCredentials.bin file which, through the –w option, is automatically
flashed at the default location according to the table below.
UM2169
Sigfox Flasher
Table 13. SIGFOX_FLASHER parameters
Device
STM32L00x0800FF00
STM32L10x08000200
STM32F00x0801F000
STM32F40x08004000
BlueNRG-10x10066000
BlueNRG-20x1007E000
6.6.3Encryption
The Sigfox key can be optionally encrypted using an AES 128 bit encoding algorithm, with a 16-byte long key.
There are three ways of handling key encryption:
•no encryption
•fixed encryption
•variable encryption
6.6.3.1No encryption
With the -e none option, the key provided as input will be stored as is, without any encryption or elaboration.
6.6.3.2Fixed encryption
The term fixed identifies an encryption key used always as is for each board.
When fixed encryption is selected, using the -e fixed option, the custom key has to be provided with the -k option
as in the example above.
Table 14. Devices and related default Sigfox board data address
Default Sigfox board data address
UM2169 - Rev 7
page 25/32
6.6.3.3Variable encryption
The term variable identifies a different encryption key for every board based on its own unique ID.
To enable this type of encryption, type the option -e variable.
UM2169
Sigfox Flasher
UM2169 - Rev 7
page 26/32
Revision history
DateVersion Changes
01-Feb-20171Initial release.
07-Sep-20182
11-Mar-2019
02-Sep-20194Updated Section 6.6 Sigfox credentials and Section 6.6.1 Prerequisites.
13-Sep-20195Updated Table 2. Available command line functions.
Figure 10. JP1 position on STM32 Nucleo board ................................................... 11
Figure 11. Sigfox Demo GUI main window........................................................12
Figure 12. Sigfox DEVICE TYPE tab............................................................12
Figure 13. Sigfox DEVICE TYPE parameters...................................................... 13
Figure 14. Command line terminal box .......................................................... 13
Figure 15. Command line function list ........................................................... 14
Figure 16. STEVAL-IDB007V1/2 or STEVAL-IDB008V2 hardware modifications.............................. 22
UM2169 - Rev 7
page 31/32
UM2169
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST
products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST
products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of
Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or service
names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.