Page 1
Quick Start Guide Contiki OS and 6LoWPAN sub-1GHz RF communication software expansion for STM32 Cube (Contiki6LP) Version 1.3 (December 10, 2018)
Page 2
Quick Start Guide Contents Contiki6LP: Contiki OS/6LoWPAN and sub-1GHz RF communication Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview 12/18/2018...
Page 3
M95640-RMC6TG 64-Kbit serial SPI bus EEPROM SPSGRF-868 or EEPROM SPSGRF-915 (*) (*) Identification of the operating frequency of the X-NUCLEO- IDS01Ax (x=4 or 5) is performed through two resistors (R14 and R15). Latest info available at www.st.com X-NUCLEO-IDS01A4 X-NUCLEO-IDS01A5...
IEEE 802.15.4g hardware packet support with whitening, FEC, CRC and dual SYNC word detection • RX and TX 128 byte FIFO buffers Key products on board S2LP Ultra-low power, high performance, sub-1GHz transceiver S2-LP EEPROM M95640-RMN6TP 64-Kbit serial SPI bus EEPROM Latest info available at www.st.com X-NUCLEO-S2868A1...
Contiki OS/6LoWPAN and sub-1GHz RF communication Software Overview Contiki6LP Software Description Contiki6LP is a library implemented as a STM32Cube Overall Software Architecture middleware ready to be integrated in projects based on STM32Cube and X-CUBE-SUBG1 expansion software. The expansion software built...
Page 6
Quick Start Guide Contents Contiki6LP: Contiki OS/6LoWPAN and sub-1GHz RF communication Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview 12/18/2018...
Page 7
Setup & Demo Examples HW prerequisites • STM32 Nucleo development board NUCLEO-L152RE or NUCLEO-F401RE • Sub-1GHz RF expansion board for STM32 Nucleo based on the Spirit 1 (X-NUCLEO- IDS01A4) or S2LP-868 module (X-NUCLEO-S2868A1) • Windows/Linux PC • mini USB cable X-NUCLEO-S2868A1 NUCLEO-F401RE mini USB cable...
Page 8
• Download and extract the X-CUBE-SUBG1 package, version 3.0.0 or higher • A toolchain to build the firmware • The Contiki6LP library has been developed and tested with • IAR Embedded Workbench for ARM® (EWARM) toolchain + ST-Link • RealView Microcontroller Development Kit (MDK-ARM) toolchain + ST-LINK •...
Page 9
Demo Execution Using SPSGRF (SPIRIT1) 12/18/2018...
Page 10
Contiki6LP Start coding in just a few minutes with Contiki6LP www.st.com/x-nucleo Go to X-CUBE-SUBG1 package Select X-NUCLEO-IDS01Ax Documentation Drivers and BSP Contiki OS and 6LoWPAN stack Application examples Download and unpack X-CUBE-SUBG1 Download & install STM32 Nucleo ST-LINK/V2-1 USB driver Select the SPIRIT1 radio configuration And then build and flash the application code.
Page 11
Demo Overview – UDP Sender and Receiver 6LoWPAN Udp-sender node NUCLEO-L152RE or NUCLEO-F401RE X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 Host PC with a terminal Utility USB1 Messages USB2 6LoWPAN Udp-receiver node NUCLEO-L152RE or NUCLEO-F401RE X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 12/18/2018...
Page 12
UDP Sender and Receiver examples in a few steps (1/2) Download and extract X-CUBE-SUBG1 Compile the firmware for the UDP Receiver node: Select the “Udp-receiver” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this application with the selected STM32 Nucleo board Compile the firmware for the UDP sender node: Select the “Udp-sender”...
Page 13
UDP Sender and Receiver examples in a few steps (2/2) Launch the terminal application and set the UART port to The terminal should be printing something like 115200 bps, 8 bit, No Parity, 1 stop bit Select the device corresponding to the UDP sender node (e.g.
Page 14
Demo Overview – Border Router Example IPv6/6LoWPAN IPv6 Host PC Network Wireless Node 6LoWPAN Border Router STM32 Nucleo board with the STM32 Nucleo board with the X-NUCLEO-IDS01A4/5 X-NUCLEO-IDS01A4/5 Ping request Ping reply 12/18/2018...
Page 15
Border Router Example in a few steps (1/3) Download and extract X-CUBE-SUBG1 Compile the firmware for a wireless node: Select the “Udp-sender” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this application with the selected STM32 Nucleo board Compile the firmware for the border router node: Select the “Border-router”...
Page 16
Setup the IPv6 Host PC for IP traffic bridging between Border Router Example host and 6LowPAN border Router in a few steps (2/3) From: [ROOT]/Middlewares/Third_Party/Contiki Windows PC setup (Win 7/8) Linux PC setup (Ubuntu) using “wpcapslip6” utility using “tunslip6” utility 1.
Page 17
Border Router Example Open a Web browser (Firefox) to access the Contiki server in a few steps (3/3) providing the RPL neighbors and routes information. Contiki server address (see previous step) between brackets, e.g. [aaaa::800:f5ff:eb3a:14c5] [Linux:] ping6 aaaa::a00:f7ff:b9bc:4643 Ping the wireless [Windows:] ping -6 aaaa::a00:f7ff:b9bc:4643 Node to test the 6LoWPAN connectivity...
Page 18
Demo Overview – Serial Sniffer Example PC running Wireless Nodes Wireshark STM32 Nucleo boards with the IPv6/6LoWPAN X-NUCLEO-IDS01A4/5 Network Serial Sniffer STM32 Nucleo board with the X-NUCLEO-IDS01A4/5 12/18/2018...
Page 19
Serial Sniffer Example in a few steps (1/3) Download and extract X-CUBE-SUBG1 Compile the firmware for the Serial Sniffer: Select the “Serial-sniffer” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this A pre-requisite to use the Serial Sniffer is a application with the selected STM32 Nucleo board running 6LoWPAN network, you can refer to the...
Page 20
Setup the PC Serial Sniffer Example running Wireshark application in a few steps (2/3) From: [ROOT]/Utilities/serial-sniffer Windows PC setup (Win 7/8) Linux PC setup (Ubuntu) using “serialdump-windows.exe” utility using “serialdump-linux” utility 1. run Cygwin as administrator 1. serialdump-linux utility has to be compiled: 2.
Page 21
Serial Sniffer Example Wireshark application should be running, packets in a few steps (3/3) seen on the air can be analyzed and saved 12/18/2018...
Page 23
Contiki6LP Start coding in just a few minutes with Contiki6LP www.st.com/x-nucleo Go to X-CUBE-SUBG1 package Select X-NUCLEO-S2868A1 Documentation Drivers and BSP Contiki OS and 6LoWPAN stack Application examples Download and unpack X-CUBE-SUBG1 Download & install STM32 Nucleo ST-LINK/V2-1 USB driver Select the S2-LP radio configuration And then build and flash the application code.
Page 24
Demo Overview – UDP Sender and Receiver 6LoWPAN Udp-sender node NUCLEO-L152RE or NUCLEO-F401RE X-NUCLEO-S2868A1 or X-NUCLEO-S2915A1 Host PC with a terminal Utility USB1 Messages USB2 6LoWPAN Udp-receiver node NUCLEO-L152RE or NUCLEO-F401RE X-NUCLEO-S2868A1 or X-NUCLEO-S2915A1 12/18/2018...
Page 25
UDP Sender and Receiver – S2LP examples in a few steps (1/2) Download and extract X-CUBE-SUBG1 Compile the firmware for the UDP Receiver node: Select the “Udp-receiver” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this application with the selected STM32 Nucleo board Compile the firmware for the UDP sender node: Select the “Udp-sender”...
Page 26
UDP Sender and Receiver examples in a few steps (2/2) Launch the terminal application and set the UART port to The terminal should be printing something like 115200 bps, 8 bit, No Parity, 1 stop bit Select the device corresponding to the UDP sender node (e.g.
Page 27
Demo Overview – Low Power features When using NUCLEO-L152RE and X- NUCLEO-S2868A1 Low Power features are available for both MCU and Radio. The following settings are enabled by default on Udp-sender and Udp-receiver applications: • MCU System Clock is set to 4 MHz •...
Page 28
Demo Overview – Border Router Example IPv6/6LoWPAN IPv6 Host PC Network Wireless Node 6LoWPAN Border Router STM32 Nucleo board with the STM32 Nucleo board with the X-NUCLEO-S2868A1 X-NUCLEO-S2868A1 Ping request Ping reply 12/18/2018...
Page 29
Border Router For S2-LP Example in a few steps (1/3) Download and extract X-CUBE-SUBG1 Compile the firmware for a wireless node: Select the “Udp-sender” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this application with the selected STM32 Nucleo board Compile the firmware for the border router node: Select the “Border-router”...
Page 30
Setup the IPv6 Host PC for IP traffic bridging between Border Router Example host and 6LowPAN border Router in a few steps (2/3) From: [ROOT]/Middlewares/Third_Party/Contiki Windows PC setup (Win 7/8) Linux PC setup (Ubuntu) using “wpcapslip6” utility using “tunslip6” utility 1.
Page 31
Border Router Example Open a Web browser (Firefox) to access the Contiki server in a few steps (3/3) providing the RPL neighbors and routes information. Contiki server address (see previous step) between brackets, e.g. [aaaa::800:f5ff:eb3a:14c5] [Linux:] ping6 aaaa::a00:f7ff:b9bc:4643 [Windows:] ping -6 aaaa::a00:f7ff:b9bc:4643 Ping the wireless Node to test the 6LoWPAN connectivity...
Page 32
Demo Overview – Serial Sniffer Example PC running Wireless Nodes Wireshark STM32 Nucleo boards with the IPv6/6LoWPAN X-NUCLEO-S2868A1 Network Serial Sniffer STM32 Nucleo board with the X-NUCLEO-S2868A1 12/18/2018...
Page 33
Serial Sniffer Example in a few steps (1/3) Download and extract X-CUBE-SUBG1 Compile the firmware for the Serial Sniffer: Select the “Serial-sniffer” application and build the Project using a supported IDE. Alternatively you can use a pre-built binary that is provided for running this A pre-requisite to use the Serial Sniffer is a application with the selected STM32 Nucleo board running 6LoWPAN network, you can refer to the...
Page 34
Setup the PC Serial Sniffer Example running Wireshark application in a few steps (2/3) From: [ROOT]/Utilities/serial-sniffer Windows PC setup (Win 7/8) Linux PC setup (Ubuntu) using “serialdump-windows.exe” utility using “serialdump-linux” utility 1. run Cygwin as administrator 1. serialdump-linux utility has to be compiled: 2.
Page 35
Serial Sniffer Example Wireshark application should be running, packets in a few steps (3/3) seen on the air can be analyzed and saved 12/18/2018...
Page 36
Getting started with the software package for Point-to-Point communications using SPIRIT1 sub-1GHz modules in X-CUBE- SUBG1, Expansion for STM32Cube – user manual • UM2040: Getting started with Contiki6LP, Contiki OS and 6LoWPAN sub-1GHz RF communications software expansion for STM32Cube – user manual X-NUCLEO-IDS01A4: •...
Page 37
Quick Start Guide Contents Contiki6LP: Contiki OS/6LoWPAN and sub-1GHz RF communication Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview 12/18/2018...
Page 38
The STM32 Open Development Environment (ODE) consists of a set of stackable boards and a modular open SW environment designed around the STM32 microcontroller family. STM32 Nucleo STM32Cube expansion boards development software (X-NUCLEO) STM32Cube STM32 Nucleo expansion software development boards (X-CUBE) Function Packs (FP) www.st.com/stm32ode 12/18/2018...
Page 39
Power supply STM32 microcontroller through USB or external source Integrated debugging Complete product range and programming from ultra-low power to high-performance ST-LINK probe ST morpho extension header Arduino™ UNO R3 extension headers 12/18/2018 www.st.com/stm32nucleo...
Page 40
Boards with additional functionality that can be plugged directly on top of the STM32 Nucleo development board directly or stacked on another expansion board. Connect Power Move/Actuate Interact Sense Motion MEMS sensors Environmental sensors DIL24 support for new devices Example of STM32 expansion board (X-NUCLEO-IKS01A1) 12/18/2018 www.st.com/x-nucleo...
Environment is compatible with a number of IDEs including IAR EWARM, Keil MDK, and GCC-based environments. Users can choose from three IDEs from leading vendors, which are free of charge and deployed in close cooperation with ST. These include Eclipse-based IDEs such as Ac6 System Workbench for STM32 and the MDK-ARM environment.
Page 42
NFC, Wi-Fi, GNSS Audio amplifier ACCESS Touch controller Translate Operation Amplifier CREATE Move / Stepper motor driver DC & BLDC motor driver Actuate Industrial input / output POWER Power Energy management & battery General-purpose microcontrollers PROCESS Process Secure microcontrollers www.st.com/stm32ode Software 12/18/2018...
Need help?
Do you have a question about the Contiki6LP and is the answer not in the manual?
Questions and answers