How to use BlueNRG-MS (BTLE v.4.1) & Enocean PTM 215B

If you like it, share it

. .

enoceandoppiotasto  nucleo-f401re x-nucleo-idb05a1

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 on SPBTLE-RF + NUCLEO-F401RE  for receiving the data from the Enocean PTM 215B

For do this test I used this kit:

Of course, there are also the examples and bin ready to use for the NUCLEO listed below.
a

The project is also available for the IDE listed below.

ide

  1. Download and install the GUI –  STSW-BLUENRG-DK.
  2. Download and unzip the X-CUBE-BLE1
  3. 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.

    enoceandandd
  4. Now run BlueNRG GUI
    Select the communications port from the NUCLEO-F401RE and press OPEN (see below)
    guibtle
  5. Activate the: MODE 4
    see below.
    btlemode4
  6. Set in the advertising mode the BTLE.
    btleadvmode
  7. 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.

    enoceanresult

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:

The project is also available for the IDE listed below.

ide

  1. Download and unzip the X-CUBE-BLE1
  2. 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

  3. 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.

extrattoswperenocean

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.

  1. Dowload and install TeraTerm
  2. Open TeraTerm and configure it as shown below.

    enoctt1

    enoctt2
  3. Now, if you start your application, you must see something like below.

    enoctt3

 

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