3 years, 1 month ago.

Calls to BLE functions in examples

I'm trying to understood how calls to BLE functions are doing. How to tell controler to use functions for BLE device. I'm finding into main.cpp deffinition like #include "ble/BLE.h" and #include "ble/Gap.h" but I could not find something like #include "BlueNRGGap.h" or #include "BlueNRGDevice.h" which belong to SPBTLE-RF module. Where are calls to functions belong to SPBTLE-RF module? Please, I'm begginer and want to understood every step.

Question relating to:

STM32L4 Discovery kit IoT node, low-power wireless, BLE, NFC, SubGHz, Wi-Fi

1 Answer

3 years, 1 month ago.


you can find on GitHub the source code of the ble-x-nucleo-idb0xa1 library, the one referenced by the example you are mentioning (see link in shields/TARGET_ST_BLUENRG.lib file).

Currently, official BLE examples relies on Cordio implementation for BLE support.

Kind regards


Thank You Andrea for Your answer. My question is what to write after #include directive in main.cpp for calling functions for SPBTLE-RF module.


posted by Mitko Tolev 24 Jun 2019

Hi Mitko,

to run the example, you don't need to change the main.cpp by adding other #include directives or whatever. You can see the list of supported boards in mbed_app.json file, which eventually can be updated with other ST boards.

You may want to take a look at the documentation page for projects based on mbed-os.



posted by Andrea Palmieri 24 Jun 2019

Thank You Andrea, I find file mbed_app.json in every BLE example. How I can add to my project? But for me is more interesting how application find it's path to destination function. What happen after: "DISCO_L475VG_IOT01A": { "target.features_add": ["BLE"], "target.extra_labels_add": ["ST_BLUENRG"]

regards, Mitko

posted by Mitko Tolev 25 Jun 2019