Page 1
UM2920 User manual Getting started with the STSW-S2LP-KNX-DK software package for KNX-RF Introduction STSW-S2LP-KNX-DK is an evaluation package based on the S2-LP high performance ultra-low power RF transceiver and BlueNRG-2 very low power Bluetooth Low Energy (BLE) system-on-chip. It is designed to evaluate KNX-RF communication in the 868 MHz license-free ISM band.
STEVAL-IDB008V2 evaluation board 1.3.1.1 Modifying the STEVAL-IDB008V2 To make the STEVAL-IDB008V2 compatible with the STSW-S2LP-KNX-DK package, perform the below modifications on the board bottom side. Step 1. Remove R12. Step 2. Create a short-circuit between pin 8 and pin 7 on CN3 connector.
UM2920 Hardware configurations Step 5. Set a short between pin 6 and CN4 connector and the internal pad of R19. Figure 4. CN4 modifications Before After Step 6. Remove R11. Step 7. Create a short-circuit between R8 and DIO8. 1.3.2 NUCLEO-L073RZ To run the demo using the STM32L073RZ...
Software requirements Figure 7. X-NUCLEO-S2868A2 expansion board 1.3.3.1 Modifying X-NUCLEO-S2868A1/X-NUCLEO-S2868A2 expansion boards To make X-NUCLEO-S2868A1/X-NUCLEO-S2868A2 compatible with the STSW-S2LP-KNX-DK package, when used with the STEVAL-IDB008V2 only, you have to apply the modifications below to the S2-LP expansion board. Step 1.
UM2920 Software requirements Step 3. Activate the license at https://www2.keil.com/stmicroelectronics-stm32/mdk. Figure 10. MDK-ARM license activation for Cortex-M0/M0+ Step 3a. Copy PSN code (XXXX-XXXX-XXXX). Step 3b. Go to Keil IDE license management. Step 3c. Click on the [Get a LIC via Internet] button. Step 3d.
UM2920 Software requirements Figure 11. Procedure to activate free Keil license 1.4.2 KNX ETS5 The ETS5 tool, which stands for Engineering Test Software, is needed to install and configure a KNX network independently from the media used (wired or wireless). The installation of ETS5 is required to evaluate KNX-RF devices based on BlueNRG-2, S2-LP STM32L0...
UM2920 Dedicated Android apps for BLE connectivity Figure 13. BlueNRG-X Flasher Utility installation 1.4.4 STM32CubeProgrammer install STM32CubeProgrammer software It provides an environment to program STM32 microcontrollers and load pre-compiled binaries. Figure 14. STM32CubeProgrammer installation Dedicated Android apps for BLE connectivity KNX-RF evaluation package contains the APK file: BlueNRGKNX_Android.apk.
UM2920 Alternative apps for BLE connectivity Figure 15. Light control app APK file is available in the /Android Apps folder. Figure 16. APK file location Alternative apps for BLE connectivity As the APK Android application (working on Galaxy S10 smart phone family) is not maintained, there is an alternative solution using generic Bluetooth Low Energy apps, such as BLE Scanner, available on Google Store.
UM2920 KNX-RF evaluation package options KNX-RF evaluation package options Package overview KNX-RF package demonstrates: • S2-LP Sub-1GHz transceiver capabilities to support KNX-RF multi-protocol • BlueNRG-2 BLE 5.1 system-on-chip capabilities to host KNX-RF stack and to run BLE and KNX-RF stack with a single Cortex-M0 core (in combination with S2-LP) •...
UM2920 KNX-RF frameworks based on STM32L0 microcontroller KNX-RF frameworks based on STM32L0 microcontroller Another framework is based on STM32L0 Cortex-M0+ microcontroller. It provides a simple KNX-RF switch application (VCOM required to simulate buttons) and KNX-RF light application is simulated with another board receiving light control commands (on/off, dimming and color control).
UM2920 ETS connectivity through KNX RF/TP gateway based on BlueNRG-2 evaluation kits Figure 21. Point-to-point topology based on STM32L0 development boards (NUCLEO-L073RZ) ETS connectivity through KNX RF/TP gateway based on BlueNRG-2 evaluation kits This ETS connectivity topology is based on KNX RF/TP gateway and KNX wired infrastructure (KNX bus power supply and KNX USB interface).
UM2920 ETS connectivity through USB dongle based on BlueNRG-2 evaluation kits Figure 23. ETS connectivity based on STM32L0 development boards ETS connectivity through USB dongle based on BlueNRG-2 evaluation kits This topology is based on Tapko Technology USB dongle and KNX wired infrastructure (KNX bus power supply and KNX USB interface).
UM2920 ETS connectivity through USB dongle based on STM32L0 development boards ETS connectivity through USB dongle based on STM32L0 development boards This topology is based on Tapko Technology USB dongle and KNX wired infrastructure (KNX bus power supply and KNX USB interface). KNX-RF application examples are based on STM32L0 development boards (NUCLEO-...
UM2920 Point-to-point KNX-RF communication setup Point-to-point KNX-RF communication setup This section describes KNX-RF point-to-point communication setup either using BlueNRG-2 kits or using STM32L0 kits. BlueNRG-2 setup 3.1.1 Hardware setup Step 1. BlueNRG-2 kit evaluation setup, use two pairs of: – BlueNRG-2 kits: STEVAL-IDB008V2...
UM2920 BlueNRG-2 setup Step 2. Connect STEVAL-IDB008V2 to your PC/laptop by selecting the associated COM port in the tool. Figure 27. Selecting the COM port Step 3. Mass erase the two BlueNRG-2 kits. Figure 28. Mass erase Step 4. Download the following files on the boards: –...
UM2920 BlueNRG-2 setup Step 5. Follow the procedure described below using STSW-BNRGFLASHER. Figure 30. STSW-BNRGFLASHER procedure Step 6. Use the binaries according to the topology shown below. Figure 31. Topology for hex files Step 7. For the LED actuator application and to get lighting control commands, set up Tera Term (or hyperterminal) as shown below.
UM2920 BlueNRG-2 setup Step 8. Push the reset button (on the LED actuator application) to reset information on Tera Term. Figure 33. Resetting Tera Term information Reset Choose 115 kbaud button 3.1.3 KNX-RF evaluation using dedicated BLE apps Step 1. Power supply both BlueNRG-2 kits via PC using micro-USB cables.
UM2920 BlueNRG-2 setup Step 3. Start a dedicated smartphone app. The following screen appears, showing the BLE device scanning refresh (highlighted in pink in the figure below). Figure 34. Refresh BLE device scanning The application scans for BLE devices but also for KNX-RF applications. The expected BLE scan outcome is to find ‘BlueNRG2_KNX1’...
UM2920 BlueNRG-2 setup Step 4. Select ‘BlueNRG2_KNX1’ to connect your smartphone to the BlueNRG-2 device. The smartphone and the BlueNRG-2 Push Button application are connected via BLE. Figure 36. BLE KNX-RF Push Button application On the smartphone application, a new screen appears showing the device is connected (in case BLE connection is lost, the app automatically switches back to ‘Scan’...
UM2920 BlueNRG-2 setup Step 5. Select Channel 1 to control peer LED actuator application. Figure 37. LED control application Channel for KNX-RF LED Actuator application LED color control LED dimming control On/off control Note: Android apps are not maintained. Figure 38. On/Off control example Terminal on LED Actuator side Switch on...
(short range) Enhanced control thanks to BLE technology 3.1.4 KNX-RF evaluation using standard BLE apps As dedicated apps are not maintained by ST, you can also use standard BLE apps, such as BLE Scanner. UM2920 - Rev 1 page 25/71...
UM2920 BlueNRG-2 setup Figure 42. BLE Scanner app Step 1. Install the BLE Scanner app and open it. Step 2. Refresh the main screen to scan BLE devices. Differently from the dedicated BLE apps, BLE Scanner app is able to display all Bluetooth devices in the range of the smartphone.
UM2920 BlueNRG-2 setup Step 3. Check that ‘BlueNRG2_KNX1’ device name is in the list. Figure 43. BlueNRG2_KNX1 device identified Step 4. Connect to KNX-RF switch application. Step 4a. Push the [Connect] button. If the connection is correctly established, the status is "Connected". Step 4b.
UM2920 BlueNRG-2 setup Step 5. Click on [Write] to send BLE data (in ASCII characters) from the smartphone application to the BLE KNX-RF application. The Text box pops up. Figure 45. Write command in Custom Characteristic Example of Switch On command: –...
UM2920 BlueNRG-2 setup ◦ the length of ASCII sequence should be same Figure 47. Switch off example Example of Dimming command: – Type "LDIM_1_XXXx" ◦ ‘1’ is the channel to be used ◦ ‘XXX’ is the decimal between 0 and 255 ◦...
UM2920 STM32L0 setup Figure 49. Color command example Green Blue Table 1. ASCII commands associated with BLE scanner application Command Channel 1 with BLE Scanner Comments Switch on LOO_1_ONx Switch off LOO_1_OFFx Dimming LDIM_1_XXXx XXX = decimal value between 0 (0%) and 255 (100%) LRGB_1_XXX_YYY_ZZZx XXX (R), YYY (G), ZZZ (B) are decimal values between 0 and 255 STM32L0 setup...
Connect NUCLEO-L073RZ to your PC/laptop by clicking on [Connect]and using the STM32 Nucleo embedded ST-LINK. Figure 51. Connecting the development board via STM32CubeProgrammer Step 3. Erase the EEPROM by selecting the last two options shown in the figure below and clicking on [Full chip erase].
UM2920 STM32L0 setup Step 4. Use the binaries according to the topology shown below. Figure 53. Topology for the binary files Tera Term (or Hyperterminal) window is necessary for both applications: – for KNX-RF push button application, to type commands (on/off, dimming, color); –...
UM2920 STM32L0 setup Step 7. To set up the KNX-RF switch application, select [CR+LF] for transmitting and receiving, and tick [Local echo] box. Figure 56. KNX-RF switch application setup UM2920 - Rev 1 page 34/71...
UM2920 STM32L0 setup 3.2.3 KNX-RF evaluation using STM32 Nucleo development boards Step 1. After pressing the reset buttons, check the messaged displayed. Figure 57. Messages displayed after board reset Example of Switch On/Off commands: – Type "LOO_1_ON" or "LOO_1_OFF" ◦ ‘1’...
UM2920 STM32L0 setup Figure 59. Dimming command Example of Color command: – Type "LRGB_1_XXX_YYY_ZZZx" ◦ ‘1’ is the channel to be used ◦ ‘XXX’, ‘YYY’ and ‘ZZZ’ are decimal values between 0 and 255 (respectively, for red, green and blue) Figure 60.
UM2920 ETS5 KNX-RF communication setup ETS5 KNX-RF communication setup This section describes how to set up ETS5 tool and KNX-RF devices based on BlueNRG-2 kits or using STM32L0 kits. ETS5 setup can be performed through: • Tapko RF/TP coupler (with KNX TP line) •...
KNX USB interface - to provide USB interface to connect PC ETS tool and to configure the whole network Figure 65. KNX bus power supply 4.1.3 Start ETS project ETS project examples are available in the STSW-S2LP-KNX-DK software package. Step 1. Launch ETS5 tool. UM2920 - Rev 1 page 39/71...
Step 3. Go to ETS_Test_Project folder (\\Project\KNX\ETS_Test_Project) and select the RF/TP coupler project. Figure 67. Selecting the project Step 4. Select [Test ST BlueNRG2 unsecure with TPRF MediaCoupler.knxproj]. Step 5. Enter password ("ST"). Figure 68. Entering the project password UM2920 - Rev 1...
UM2920 ETS5 setup through Tapko RF/TP coupler Step 6. Configure USB interface by connecting the USB cable between PC and KNX USB interface. Figure 69. Configuring the USB interface Step 7. Once the ETS project has been imported, double-click it from ETS interface to open it and enter the password again to open the project.
UM2920 ETS5 setup through Tapko RF/TP coupler Step 8. Check ETS USB interface. Figure 71. Checking the USB interface Step 9. Click on the [Test] button. Successful testing returns an [OK] message. 4.1.4 ETS project overview ETS project shows the KNX system topology. For evaluation purposes KNX topology is simple (limited to 5 devices maximum).
UM2920 ETS5 setup through Tapko RF/TP coupler Figure 73. Push button application Figure 74. LED actuator application To monitor KNX communication on both KNX bus (KNX-TP devices) and KNX-RF interface, a dummy device is configured in ETS tool. Figure 75. Dummy device configuration 4.1.6 ETS group monitor...
UM2920 ETS5 setup through Tapko RF/TP coupler Figure 76. Group Monitor 4.1.7 ETS evaluation with BlueNRG-2 devices To start ETS evaluation with BlueNRG-2 devices, you have to install and initialize your devices in the KNX system through the ETS tool. The configuration download has to be done from already built ETS projects.
UM2920 ETS5 setup through Tapko RF/TP coupler Step 2. Press PUSH2 on the BlueNRG-2 board to switch to programming mode. Figure 79. BlueNRG-2 board PUSH2 button Step 3. Monitor KNX-RF activities on [Group Monitor] panel. Figure 80. KNX-RF activity transfer 4.1.7.3 Push button application As this application requires low-power mode activation (KNX-RF switch is supposed to run over battery), there are...
UM2920 ETS5 setup through Tapko RF/TP coupler Step 6. Keep pressing PUSH2 button until the red LED becomes continuously ON and the blue LED does not blink anymore. Figure 82. BlueNRG-2 board LEDs Red LED Blue LED Push button application download will start. Figure 83.
UM2920 ETS5 setup through Tapko RF/TP coupler Step 7. Reset the application to restart by pressing the [RESET] button. Figure 85. RESET button When performing KNX-RF communication, ETS tool monitors all KNX activity in the system as shown in the Group Monitor panel. Figure 86.
UM2920 ETS5 setup through Tapko RF/TP coupler You also need to install and configure TP/RF coupler as described in Section 4.1.7.1 Step 1. Use the same ETS project and configuration of BlueNRG-2 boards. Figure 88. ETS project topology Step 2. Right-click on the device to initiate ETS full download.
UM2920 ETS5 setup through Tapko USB dongle Step 4. Long push the STM32 Nucleo blue button until download starts. Figure 91. Starting the download Step 5. Refer to the Group Monitor panel to check KNX-RF communications during ETS download. Figure 92. KNX-RF communications during ETS download Once STM32L0...
KNX USB dongle by Tapko Technologies - USB interface with the ETS tool Figure 96. UIMrf - KNX USB interface 4.2.3 Start ETS project ETS project examples are available in the STSW-S2LP-KNX-DK software package. Step 1. Launch ETS5 tool. Step 2. Import ETS projects from KNX-RF package (needed the first time only).
UM2920 ETS5 setup through Tapko USB dongle Step 4. Enter password ("ST"). Figure 99. Entering the project password Step 5. Configure USB interface by connecting the dongle. Figure 100. Configuring the USB interface Domain address to be updated Step 6.
UM2920 ETS5 setup through Tapko USB dongle Step 7. Once the ETS project has been imported, double-click it from ETS interface to open it and enter the password again to open the project. Figure 102. Opening the ETS project 4.2.4 ETS project overview ETS project shows the KNX system topology.
UM2920 ETS5 setup through Tapko USB dongle Figure 104. Push button application Figure 105. LED actuator application To monitor KNX communication on both KNX bus (KNX-TP devices) and KNX-RF interface, a dummy device is configured in ETS tool. Figure 106. Dummy device configuration 4.2.6 ETS group monitor...
UM2920 ETS5 setup through Tapko USB dongle Figure 107. Group Monitor 4.2.7 ETS evaluation with BlueNRG-2 devices To start ETS evaluation with BlueNRG-2 devices, you have to install and initialize your devices in the KNX system through the ETS tool. The configuration download has to be done from already built ETS projects.
UM2920 ETS5 setup through Tapko USB dongle Step 4. Wait for the message below to appear. Figure 110. Press programming button message Step 5. Hold PUSH2 button pressed while sending BLE commands through the app. BlueNRG-2 application takes into account chipset wake-up by an external source. Step 6.
UM2920 ETS5 setup through Tapko USB dongle Step 7. Reset the application to restart by pressing the [RESET] button. Figure 114. RESET button When performing KNX-RF communication, ETS tool monitors all KNX activity in the system as shown in the Group Monitor panel. Figure 115.
UM2920 ETS5 setup through Tapko USB dongle Step 1. Use the same ETS project and configuration of BlueNRG-2 boards. Figure 117. ETS project topology Step 2. Right-click on the device to initiate ETS full download. Figure 118. ETS full download Step 3.
UM2920 ETS5 setup through Tapko USB dongle Step 5. If the following message appears (after complete chip Flash and EEPROM erase), press [OK] to resume download. Figure 121. Alert message Step 6. Refer to the Group Monitor panel to check KNX-RF communications during ETS download. Figure 122.
UM2920 ETS5 setup through Tapko USB dongle Figure 124. Device not responding during full download procedure Figure 125. Failed download Step 1. To unblock situation, perform STM32L0 full chip erase and download again the related binary. Step 2. Start a new ETS download. UM2920 - Rev 1 page 60/71...
UM2920 KNX-RF software package KNX-RF software package KNX-RF package structure KNX-RF package provides source code (except for BLE and KNX-RF stack) for application examples. Figure 126. KNX-RF package structure Android apps for Bluetooth low energy connectivity Pre-compiled binaries for BlueNRG-2 and STM32 applications KNX, BLE stacks and drivers KNX-RF projects and application C-files...
UM2920 KNX-RF project examples Figure 128. Keil project examples These project examples are related to the BlueNRG-2 STM32L0 applications shown below. Figure 129. BlueNRG-2 application Figure 130. STM32L0 application Both projects provide different configurations: UM2920 - Rev 1 page 62/71...
Figure 132. LED actuator application configurations 5.2.2 Keil project debug Using BlueNRG-2 evaluation kits (STEVAL-IDB008V2), debug is possible using an additional debug probe (ST- LINK/V2). Figure 133. Keil project examples With STM32L0 (NUCLEO-L073RZ) setup, ST-LINK/V2 is integrated and there is no need for an extra device to debug the software.
Page 69
UM2920 List of figures Figure 53. Topology for the binary files ............33 Figure 54.
Page 70
UM2920 List of figures Figure 107. Group Monitor ..............55 Figure 108.
Page 71
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’...
Need help?
Do you have a question about the STSW-S2LP-KNX-DK and is the answer not in the manual?
Questions and answers