cancel
Showing results for 
Search instead for 
Did you mean: 

Getting started with SPBTLE-RF

attemptx
Associate II

Hello,

my name is Clément and I am a student and new to STM. I have experience in programming 8 bit PIC microcontroller in C/MPLAB X and I also have worked with a BeagleBone Black and C++/Eclipse.

For a project I'd like to use a STM32 microcontroller with FreeRTOS and Bluetooth connectivity. Therefore I got myself a Nucleo64F401RE and a X-NUCLEO-IDB05A1. I prepared STM32CubeMX/TrueSTUDIO and I'm able to generate all the example projects offered. 

Nevertheless I have difficulties to get started with own programs. The given documentation is not detailed enough for me.

Here is what I would like to do:

I want to send data to the microcontroller via a smartphone. At first with a Bluetooth terminal app for testing. The SPBTLE-RF should be visible and connectable to all devices with a fixed password. Also I want to be able to change the name of the module as well as the password.

I have already read many guides from ST for the BLE1 Cube extension but I still doesn't fully understand the functionality of it. So far I think knowing that I can configure the module with the hci_/aci_ commands. But by including the header files into a project without an example application I always get tons of errors while compiling, for example that a file could not be fount whereas it is definetly there. I don't particularly like Eclipse and in my opinion a lot of things are awkward.

And I still haven't figured out how data are send or received (which functions are used?, DMA writes them somwhere?).

As I mentioned before I am new to this and hoped that I could find a good documentation how to use the generated functions and examples with code-snippets.

Thank you for any help in advance!

Clément

1 REPLY 1
attemptx
Associate II

For everyone coming by, searching for beginner answers, here are the steps I made to get into this BLE module.

  1. First you HAVE to read a book about BLE, there is definitively no way around it! Adafruit offers a detailed book about this topic, I used this one: https://www.novelbits.io/introduction-to-bluetooth-low-energy-book/
  2. Read the documentation about how to use the BLE1 extension for STM32CubeMX and/or watch a video about it on YouTube.
  3. Generate the SensorDemo application and make sure that it works fine. Do not pick the option for FreeRTOS yet. It is not designed to work with FreeRTOS. However, BLE can be used with FreeRTOS: https://community.st.com/s/question/0D50X0000BUkJNLSQ3/spbtlerf-freertos
  4. Take a look at these three files: main.c, app_x-cube-ble1.c and sensor_service.c and look for services and characteristics, that's what you should have learned from reading the book.

I hope this will help someone.