ST UM1990 User manual

December 2015
DocID028662 Rev 2
1/27
www.st.com
UM1990
User manual
Wireless Bridge 868 MHz
Introduction
This user manual explains the functionality of the STM32-based Wireless Bridge (STEVAL-IDI004V2),
which can be used for various home building automation, Smart city, IoT and industrial applications.
Figure 1: Wireless Bridge 868 MHz
Figure 2: Wireless Bridge
The STEVAL-IDI004V2 board supports the following communication protocols, Wi-Fi module:
1. Wi-Fi communication @ 2.4 GHz IEEE 802.11 b/g/n using SPWF01SA module
2. Sub-GHz communication @ 868 MHz Low Power RF using SP1ML-868
3. Bluetooth communication @ 2.4 GHz,v3.0 compliant using STBT2632C2A module
4. NFC communication @ 13.56 MHz using CR95HF

Contents
UM1990
2/27
DocID028662 Rev 2
Contents
1System overview ............................................................................3
2Getting started................................................................................5
2.1 Power up sequence .........................................................................5
2.2 Application testing............................................................................5
3Android application........................................................................6
3.1 Installing Android application............................................................6
3.2 Communication over Bluetooth........................................................6
4Configuration utility .....................................................................14
4.1 Wireless Bridge configuration utility installation..............................14
4.2 Features supported........................................................................16
4.3 Utility usage....................................................................................16
4.3.1 Home page......................................................................................16
4.3.2 Wireless bridge settings ..................................................................18
4.3.3 Node registration .............................................................................18
4.3.4 Debug trace mode:..........................................................................20
5Firmware Updating and Flashing................................................22
5.1 STM32 MICROCONTROLLER (U4)..............................................22
5.1.1 Using SWD:.....................................................................................22
5.1.2 Using DFU through USB: ................................................................22
5.2 SPIRIT1 Module (U5).....................................................................24
6Reference documents..................................................................25
7Revision history ...........................................................................26

UM1990
System overview
DocID028662 Rev 2
3/27
1 System overview
The system STM32F103 microcontroller functions as the bridge between various
communications modules. The Wi-Fi, Bluetooth and Sub GHz modules are connected via
UART to the STM32, while the NFC transceiver module is connected via SPI.
The board requires a 5 V, 1 A wall adapter for power, and a USB Micro B-Type connector
can interface the board to the PC.
Figure 3: Wireless Bridge WiFi/NFC/BT/RFSubGHz scenario
When the board is connected to a PC via USB, Wi-Fi configuration parameters and the
mesh node configuration can be programmed through a PC GUI application and debug log
messages can be collected through the same GUI.
The sensor data from any node in the mesh network (6LoWPAN) is accessible through the
android application as well as through a Cloud based application at the website
(http://cloudbridge.azurewebsites.net/) using the Wi-Fi interface.
The board is powered through a 5 V, 1 A wall adapter, and the status of various
communication interfaces is indicated by five LEDs on the board.
The RF nodes that can be connected by RF SubGHz 6LoWPAN in the Wireless Bridge are
STEVAL-IDI003V2+STEVAL-IDI002V2.
The Wireless Bridge board are embedding the following RF modules:
Sub-GHz RF module: SP1ML-868
868 MHz ETSI-certified module
Based on sub-GHz SPIRIT1 transceiver, STM32L1 ULP MCU and balun (BALF-
SPI-01D3)
Chip antenna
Simple AT command
Wi-Fi module: SPWF01SA.11
2.4 GHz IEEE 802.11 b/g/n Wi-Fi
Pre-certified RF module (FCC, IC, CE)
Integrated TCP/IP
AT commands
TLS/SSL for end-to-end security
Over-the-air firmware updates

System overview
UM1990
4/27
DocID028662 Rev 2
BT Classic module: SPBT2632
Bluetooth® Classic 3.0 version
Embedded firmware, including Bluetooth stack and profile, SPP and iAP profiles
AT commands
CE, FCC, IC, TELEC certified
Low-power mode supported

UM1990
Getting started
DocID028662 Rev 2
5/27
2 Getting started
2.1 Power up sequence
Short pins 2 and 3 of jumper J13 (BOOT0 pin of STM32F103REx U4) using a 2 pin
header.
Connect a 5 V adapter to the Power Jack (J3).
LED D4 (PWR/ERR) glows red for a second and then flashes red and orange every
second. Also, LED D3 (Wi-Fi) starts blinking to indicate Wi-Fi communication.
Figure 4: Wireless Bridge board
2.2 Application testing
During correct initialization, LED D4 remains red for a few seconds and then start
toggling every second between red and orange. If the LED stops toggling, it means
the firmware is stuck in a routine, which the independent microcontroller watchdog will
eventually reset and the firmware will reboot.
LED D3 (Wi-Fi) indicates Wi-Fi communication and flashes whenever there is some
communication over the Wi-Fi.
LED D5, D7 and D8 remain off.
The SP1ML-868 module regularly seeks sensor nodes in the 6LoWPAN and, when
one is detected, D5 turns on and continues to flash while a valid sensor node remains
detected by the Wireless Bridge board. If D5 stays on without flashing, it indicates a
stuck routine and the module will be reset by the watchdog routine.
The firmware regularly scans for any NFC tags in range and, as soon as one is
detected, D8 turns on and remains on while the tag remains in the detectable range of
the Wireless Bridge board.

Android application
UM1990
6/27
DocID028662 Rev 2
3 Android application
3.1 Installing Android application
1. Save the apk in the phone memory.
2. Download a file explorer from Google Play Store; an example is ES File Explorer
(https://play.google.com/store/apps/details?id=com.estrongs.android.pop&hl=en) .
3. Use the file explorer to locate and install the apk on the phone.
The application works best on Nexus S, Nexus 4 and Nexus 7 phones and
tablets.
3.2 Communication over Bluetooth
Install the Wireless Bridge Android Application on the Android phone
(WirelessBridge.apk available on st.com)
Once installed, launch the application on the mobile phone as shown in Figure 5:
"Wireless Bridge application"
Figure 5: Wireless Bridge application
If the Bluetooth radio is not switched on, the application asks for permission to switch
on the radio, otherwise the application will exit.
The figure below shows the Wireless Bridge Application. Click on the settings on the
Application or on the icon provided on the mobile (depending on the mobile version) to
connect to the BT module of the Wireless Bridge.

UM1990
Android application
DocID028662 Rev 2
7/27
Figure 6: Wireless Bridge application main view
A dialog pops-up, asking the user to scan the BT modules available and select the
Wireless Bridge to connect with. If the BT module is has already been seen, then the
user does not need to scan devices.
Figure 7: List of available BT devices

Android application
UM1990
8/27
DocID028662 Rev 2
When the user selects the BT module, the application signals when the module
connects.
As soon as the BT module on Wireless Bridge board is connected to the smart
phone's BT interface, LED D7 turns on and stays on for as long as the connection
between the Bluetooth devices remains live.
To proceed, the user needs to click on the center of the application, as shown in
Figure 8: "Click to proceed".
Figure 8: Click to proceed
The Wireless Bridge provides nodes connected via 6LoWPAN and NFC protocols.
The application allows you to select the connectivity protocol and proceed as shown in
Figure 9: "User options". Data exchange takes place over Bluetooth communication.

UM1990
Android application
DocID028662 Rev 2
9/27
Figure 9: User options
The user needs to set the channel ID for the Wireless Bridge board and Sensor Node.
The channel Id should be same for both sets of boards. The channel ID for the
Wireless Bridge board can be set by selecting the channel ID and pressing the "Write"
button. To set the channel ID for the Sensor Node, the user needs to bring the sensor
node near the NFC antenna. The figure below shows the option to set the channel ID
for Wireless Bridge board and Sensor Nodes.

Android application
UM1990
10/27
DocID028662 Rev 2
Figure 10: Channel settings
When the user selects 6LoWPAN nodes, the Application lists the nodes connected to
the Wireless Bridge as shown in the Figure 10: "Channel settings".
Figure 11: Sensor nodes discovered
The user needs to select the node's IP address to see the sensor values for each
node as shown in Figure 11: "Sensor nodes discovered".

UM1990
Android application
DocID028662 Rev 2
11/27
Figure 12: Sensor nodes data
The user can also set the time interval for reading the sensor values of the nodes, as
shown in Figure 12: "Sensor nodes data".
Figure 13: Setting of Interval
The application lets you name each sensor node. Just hold down over the IP address
to reveal a dialog box to set the name, as show below.

Android application
UM1990
12/27
DocID028662 Rev 2
Figure 14: Set Alias name
Once set, the node is represented by its name, as shown below.
Figure 15: Alias name
You can choose to show nodes either by their assigned names or their IP addresses.
If you choose names, the IP address will still appear if the name has not been set.

UM1990
Android application
DocID028662 Rev 2
13/27
Figure 16: Different option to user
The Sensor nodes also have NFC Passive Tags. The passive tag stores the sensor
values for each node. If the 6LoWPAN network is not available, you can read the
values of sensor nodes by selecting "NFC Nodes" in Figure 16: "Different option to
user". Communication between the Android App and the Wireless Bridge is via
Bluetooth.
Figure 17: Sensor data via NFC

Configuration utility
UM1990
14/27
DocID028662 Rev 2
4 Configuration utility
The configuration utility is a software application which you can use for initial configuration
tasks and debugging the Wireless Bridge.
4.1 Wireless Bridge configuration utility installation
Figure 18: Start setup package installation
Figure 19: Accept the license agreement

UM1990
Configuration utility
DocID028662 Rev 2
15/27
Figure 20: Enter your information
Figure 21: Set the relevant path
Figure 22: Installation confirmation

Configuration utility
UM1990
16/27
DocID028662 Rev 2
4.2 Features supported
The configuration utility provides following features:
Node registration: is used to introduce new nodes in the system. The Wireless
Bridge gateway uploads the sensor data to the CloudBridge server. To upload this
data, write keys from the CloudBridge system must sent with every request. Similarly,
the gateway occasionally reads the sensor threshold data from the server. For
reading, data read API keys are required. Each node has dedicated data. These
streams and keys must be created on the CloudBridge account associated with the
Wireless Bridge and the keys must be programmed in the Wireless Bridge to allow it
to communicate with the CloudBridge platform. The Wireless Bridge Configuration
utility automates this process. The automatic generation of new channels for the new
code along with generation and subsequent programming of new keys is called node
registration.
Wi-Fi Settings: allows reading and writing SSID and Wi-Fi passwords from the
Wireless Bridge.
Debug Interface: in this mode, the utility enables trace mode and shows all the traces
received from the Gateway to help in debugging/diagnostics.
Firmware Upgrade: this feature shall be supported in future versions of the Wireless
Bridge and the Configuration Utility and will allow the updating of the primary Gateway
firmware or the firmware of various subsystems.
4.3 Utility usage
4.3.1 Home page
Once you have installed the Wireless Bridge Configuration utility, you can see the shortcut
to start the application in the start menu. To start using this utility please follow these steps:
Install the STMicroelectronics Virtual COM Port Driver. You should find the setup file
for the driver in the application installation folder.
Connect the Wireless Bridge to a free USB port. You need a USB-mini cable for this.
Power-up your Sensor nodes (sensors etc.)
Launch the Wireless Bridge Configuration Utility Tool

UM1990
Configuration utility
DocID028662 Rev 2
17/27
Figure 23: Wireless bridge configuration utility tool
Click on the plug icon to initiate the connection. The application will automatically detect the
VCOM port (virtual) on which your device is connected. If you have plugged in multiple
devices using STMicroelectronics Virtual COM Port Driver, you will need to choose from a
list of ports. Note that you can only connect one Wireless Bridge device at a time.
Once connected, the ID of the board is displayed at the top of the Utility page, as shown in
the figure below.
Figure 24: Wireless bridge utility connected to board

Configuration utility
UM1990
18/27
DocID028662 Rev 2
4.3.2 Wireless bridge settings
Wi-Fi Configuration: you need to configure the Wireless Bridge with correct SSID
and Password to access the internet via your home Wi-Fi router.
Click the Wi-Fi configuration buttonto show a screen like the figure below.
Enter the correct SSID and security key of your home Wi-Fi router, and click on
the "Write" button. A confirmation message would be displayed if the values are
written successfully as shown in Figure 26: "Node registration".
Similarly you can read the values programmed in the Wireless Bridge by clicking
the "Read" button.
Sub-GHz Channel Configuration: the Sensor nodes and the Wireless Bridge must
be on the same channel in order to communicate with each other and you need to
ensure that your channel is not same as any other gateway operating in the vicinity.
First set the Wireless Bridge channel by selecting the gateway radio button
(Default selection) and clicking "Write".
Now align the NFC antenna of the Wireless Bridge with the sensor node.
Click the "Read" button to ensure that the communication is established.
Using the same channel number as used by gateway, select the "Node" radio
box and click 'Write".
Now power on the sensor node for the changes to take effect.
Bluetooth Device Name: allows you to set the Bluetooth device name of your
Wireless Bridge. The Bluetooth device name is the name which is displayed when you
search for Bluetooth devices from your phone/computer.
Figure 25: Read/Write gateway settings
4.3.3 Node registration
The Wireless Bridge logs your sensor values to the CloudBridge website for remote
viewing. Before the gateway can affect these changes, data channels should be created for
each node on the CloudBridge site. Also, the API Keys should be programmed into the
Gateway to enable identification and communication with the CloudBridge platform. The
utility simplifies configuration by automating these actions.
Click on the "Node Registration" icon to open the page shown below.

UM1990
Configuration utility
DocID028662 Rev 2
19/27
Figure 26: Node registration
To configure your nodes:
Create an account on the CloudBridge platform website
(http://cloudbridge.azurewebsites.net)
Click read button to read all the active and registered nodes
Active nodes: are currently connected to the Wireless Bridge. The node
automatically connects to the Wireless Bridge once powered on. You should
power on the Wireless Bridge before the nodes during configuration.
Configured node: are the nodes which are linked to the CloudBridge platform
and also have their access keys stored the Wireless Bridge.
When you connect your nodes for the first time, they appear as Active (New/Unregistered
nodes).
Click the "Web Registration" button to automatically register the nodes, as per the
figure below.

Configuration utility
UM1990
20/27
DocID028662 Rev 2
Figure 27: CloudBridge Login
Enter your CloudBridge platform credentials. If the login is successful, the nodes are
registered.
Click on the tools icon to view the registration information of any node.
The current version of the utility does not support internet access through
proxies, so you must ensure that the machine is not behind a proxy server for the
"Web Registration" feature to work. You may also need to configure your firewall
to allow the application to access the internet.
The "Clear Node Data" button clears the Wireless Bridge, so if you run this command, you
must perform the registration again. The bin icon option only deletes the local registration
data stored on the Wireless Bridge. No data stored in the CloudBridge platform server is
deleted.
4.3.4 Debug trace mode:
This mode is meant for advanced users, with the application showing the trace messages
received from the Wireless Bridge.
Meanwhile the Debug Trace Mode is active, the sensor parameters will be NOT
showed on BT connection (using APP Android) or ST-CLOUD. Please, close
Debug Trace Mode to use Android APP or CLOUD.
Table of contents