This tutorial explain how to use the NUCLEO-xxx board, the module SPBTLE-RF and Enocean PTM 215B (BTLE Pushbutton Transmitter Module) using the GUI and also using the X-CUBE-BLE1 with some little changes.
- How to use the GUI for receiving the data from the Encean PTM 215V
- How to use the X-CUE-BLE1 with some little changes for receiving the Enocean PTM 215B
- How to get the files and the project ready to use, all it’s free
How to use the GUI on SPBTLE-RF + NUCLEO-F401RE for receiving the data from the Enocean PTM 215B
For do this test I used this kit:
- NUCLEO-F401RE (EvaBoard based on the STM32F401RE)
- X-NUCLEO-IDB05A1 (EvaBoard that use the BTLE v.4.1 – based on the module SPBTLE-RF module)
Inside the SPBTLE-RF there is the BlueNRG-MS component. - KEIL IDE (NOTE: there are a lot of IDE available for STM32, see here.)
Of course, there are also the examples and bin ready to use for the NUCLEO listed below.
The project is also available for the IDE listed below.
- Download and install the GUI – STSW-BLUENRG-DK.
… - Download and unzip the X-CUBE-BLE1
… - Next, go here:
….\STM32CubeExpansion_BLE1_V2.7.0\Projects\Multi\ Applications\Virtual_COM_Port\ Binary\STM32F401RE-Nucleo
And take the file: Virtual_COM_Port_F401RE.bin
and drag and drop it over the icon: NUCLEO
See below.
…
… - Now run BlueNRG GUI
Select the communications port from the NUCLEO-F401RE and press OPEN (see below)
- Activate the: MODE 4
see below.
… - Set in the advertising mode the BTLE.
… - Activate the: active scanning (from the tab: ACI_Commands)
And use the following configuration:
(1) ACI_GAP_START_OBSERVATION_PROC
(2 and 3) LE_Scan = LE_Window = 0x2000
(4) LE_Scan_Type = 0x01 → Active Scanning
(6) at the end press SEND
Now if you press a button on Enocean PTM 215B you must see the answer on the GUI, see below.
…
Go on TOP
How to use the X-CUE-BLE1 with some little changes for receiving the Enocean PTM 215B
ATTENTION:
The SW below are available only for AVNET-SILICA customers.
If you are AVNET-SILICA customers see here for how to get the password.
If you are STM customer please contact directly your local office of STM.
For implement the SW on STM32 for decode the Enocean PTM 215B I used this kit:
- NUCLEO-L053R8 (EvaBoard based on the STM32L053R8)
- X-NUCLEO-IDB05A1 (EvaBoard that use the BTLE v.4.1 – based on the module SPBTLE-RF module)
Inside the SPBTLE-RF there is the BlueNRG-MS component. - KEIL IDE (NOTE: there are a lot of IDE available for STM32, see here.)
The project is also available for the IDE listed below.
- Download and unzip the X-CUBE-BLE1
… - It is necessary do some modification on these files:
……. …….main.c
……. …….sample_service.c
……. …….stm32xx_it.c
Here there are this files ready to use.
At the bottom of this page there is an explanation on how to require to me the password for open the files, it is free.
Substitute this files on the original files present in the project in this directory:
…\STM32CubeExpansion_BLE1_V2.7.0\Projects\Multi\Applications\SampleAppThT\Src
…
- Next, go here:
…\STM32CubeExpansion_BLE1_V2.7.0\Projects\Multi\Applications\SampleAppThT\MDK-ARM\STM32L053R8-Nucleo
and double click on the file: SampleAppThT.uvprojx
At this point you have the project ready to be compile and test.
NOTE:
Below there is an extraction from the file named: sample_service.c
The lines below are the core of the sw that decode the ADVERTISING received.
–
After compiled and download the project on your NUCLEO-L053R8, if you press a button on Enocean PTM 215B you must see the GREEN led (on the NUCLEO-L053R8) that change the status.
Optionally is also possible see the messages received from Enocean on the PC using TeraTerm.
If you need do also this, follow the explanations below.
- Dowload and install TeraTerm
… - Open TeraTerm and configure it as shown below.
…
…
… - Now, if you start your application, you must see something like below.
…
Go on TOP
How to get the files and the project ready to use, all it’s free.
ATTENTION:
If you are AVNET-SILICA customers there is the files ready to use, see below.
The files modified respect to the original files present in the X-CUBE-BLE1 are here.
This new files must replace the original files in the folder: …\SampleAppThT\Src
For get the password to open the files that you have downloaded, write me an email and request the password for:
Files_for_Enocean_SampleAppThT_Src
please specify also your Name, City, Country and your contact in AVNET-SILICA.
ATTENTION:
If you are AVNET-SILICA customers there is the project ready to use, see below.
The project ready to use for: NUCLEO-L052R8 + BlueNRG-MS (BTLE v.4.1)
for test the Enocean PTM 215B, is here.
For get the password for open the project that you have downloaded, write me an email and request the password for:
Project_for_Enocean_SampleAppThT_Src
please specify also your Name, City, Country and your contact in AVNET-SILICA.–
NOTE:
If you are STM customer please contact directly your local office of STM.
Go on TOP