How to start with STM32 Wireless Long Range demo

1. Demo description

This demo shows data from wireless sensors connected to a concentrator. The sensors and the concentrator are based on STM32WL boards. The concentrator is connected to STM32CubeMonitor through the serial port to display the sensor data. There is one concentrator, and up to 15 sensors.

When the demo starts, the concentrator is configured with the region information to select the correct frequency to use.
The concentrator then broadcasts beacons and the sensors send the data (voltage, temperature, pressure, device orientation, ...).
Beacons are short messages sent periodically by the concentrator to synchronize the sensors. Beacons allow the sensors to identify which band should be used, and when the data should be sent.

Wireless long range demo


2. How to use the demo

2.1. Configuration

2.1.1. Board configuration

The software "Demo_Concentrator" must be loaded in the concentrator. The concentrator must be connected to computer with a USB cable.
The sensors device must be loaded with "Demo_Sensor" software.
The Nucleo software is available in the STM32CubeWL FW Package, in the path Projects\NUCLEO-WL55JC\Demonstrations\LocalNetwork\Concentrator and Projects\NUCLEO-WL55JC\Demonstrations\LocalNetwork\Sensor.

2.1.2. STM32CubeMonitor configuration

  1. Version 1.5.0 or above of STM32CubeMonitor is required. It can be downloaded on www.st.com/stm32cubemonitor . Detailed instructions are provided in the STM32CubeMonitor:Installing_STM32CubeMonitor wiki.
  2. Import the Wireless Long range Demo flow. Go in the top right menu, select import, then "select a file to import" and open the WLR_demo.json file.
  3. Remove the default flow (Basic_Flow). Double click on the "Basic_Flow" tab to open the properties, and click on "delete" button.
  4. Click on the DEPLOY button

2.1.3. Connection to the computer

  1. Connect the concentrator board to the computer.
  2. Open the the "Serial port configuration" tab. This tab is used to configure the serial port
Serial port configuration

then:

  1. Open the « SERIAL IN » node and click on the pencil to edit the Serial Port configuration. (Do not use the + button)
Serial port configuration
  1. Click on the search icon to the right of the “Serial Port” box to display the list of connected serial ports. Select the concentrator COM port. Set the baud rate to 9600 bps. Other parameters don’t need to be changed.
STM32CubeMonitor:WL Demo Serial port edit.png
  1. Click on the “Add/Update” button: the Serial-port configuration is ready.
  2. Open the “SERIAL OUT” node and check the Serial-port configuration.

The serial port is now configured. Click on the DEPLOY button

2.2. Start the demo

  • Open the demo with the “Dashboard” button.
start demo
  • Select the Region and subRegion and then press start.

The sensor list is displayed and is updated when data is received.

2.3. Data visualization

The list of detected sensors and the collected data are displayed in the Sensor List. For each sensor a "Sensor panel" displays charts. The serial log panel shows the AT commands exchanged with the concentrator.

2.3.1. The sensor list

sensor List

For each sensor, the table shows:

  • EUI: Sensor unique identifier
  • Packets received: Number of packets received from this sensor
  • Packets missed: The sensor increases the packet ID for each packet sent. If there is a gap between previous packet Id and the current one, it means some packets have been lost. This is counted in "missed packets".
  • RSSI: Received signal strength indicator. Shows the received power level.
  • PER: Packet error rate. The percentage of lost packets. (0 if perfect.)
  • SNR: Signal to noise ratio. Gives an indication of signal quality. A high value is better.
  • Temp: Sensor temperature value. (Use STM32 internal temperature sensor.)
  • Voltage: Power supply voltage. Should be around 3.3 V when the board is USB powered.

The "COUNTER RESET" button sets to 0: the number of received packets, the missed packets and the PER.

The "RESTART" button allows the concentrator to be reset, and returns to the Region selection page.

2.3.2. Serial log panel

The Serial port log shows the AT commands sent to the concentrator (left arrow), and the answers (right arrow). The time stamp is the local time.

Serial log panel

When the Auto Scroll switch is on, the log scrolls down automatically to display the new lines received. The button clear Log empties the log windows.

2.3.3. Sensor panels

The "Sensor x" panels are added when sensors are detected. The panels can be opened by clicking on the sensor list, or with the blue arrows on the top right of the panels. Each panel shows the current activity with it associated icon, the device 3D displayed according to it orientation, the acceleration values in a chart, both Missed packet and step count values, and displays the voltage, the temperature and the pressure in a gauge.

Sensor panel

3. Explaining the flow

The user does not need to understand how the flows works in order to use the demo: the only nodes that need to be configured are the "serial in" and "serial out". Nevertheless, some users may need to change chart sizes or add elements. In this case, the flow can be modified freely. The flows and details of how to to customize the demo are described in this page: How_to_customize_STM32_Wireless_Long_Range_demo

4. AT command details

The AT commands listed below are used for the demo dashboard.

4.1. Concentrator reset and config

  • ATZ: Resets the board.
  • AT+REGION=x: Defines the region.
  • AT+SUBREGION=x: Defines the subregion.
  • AT+BEACON_ON: Starts the beacon broadcast

4.2. Sensor status

The concentrator sends the data received from sensors in notifications: AT+RCV. Example: AT+RCV=0x00004e1c,0x10,1:1,-35,6,+26.53,1005.5,+108:+64:+0,E,1,E,172,0,1.042,1.056,3.30 The message is formatted as follows:

  • AT+RCV= : At command name
  • 0x00004e1c : Sensor EUI
  • 0x10 : number of packet transmitted by the sensor
  • 1:1 : sensor software version
  • -35 : RSSI level
  • 6 : SNR
  • +26.53 : sensor temperature (inside the MCU)
  • 1005.5 : atmospheric pressure
  • +108:+64:+0 : yaw, pitch and roll
  • E : humidity
  • 1 : activity
  • E : distance
  • 172 : step count
  • 0 : swipe count
  • 1.042 : acceleration average
  • 1.056 : acceleration max
  • 3.30 : sensor voltage

note that for sensor software version 1:0, parameters from pressure to acceleration max are not provided