2023-03-09 09:26 AM
Hello ST Support,
I have an STM32L4 MCU connected to a BlueNRG-M0 module on a custom PCB. I am not sure how to initialize the BLE gap for this BLE module. I'm using X-CUBE-BLE1 version 6.2.4 in a STM32CubeMx project with FreeRTOS. The getting started document says to use the aci_gap_init() function, but that does not exist in the library. Instead, there are the aci_gap_init_IDB04A1() and aci_gap_init_IDB051A() functions. However, both of those eval boards are NFRD and do not have the BlueNRG-M0 module. I've read a post about corrupting the memory on BLE modules, so I'm afraid to try that code before knowing if it will work with the BlueNRG-M0 module.
As far as I can tell, the X-CUBE-BLE1 library is the correct library to use for the BlueNRG-M0, but please let me know if that isn't the case. If it is, how can I safely initialize the BLE gap interface?
Best regards,
Cory
Solved! Go to Solution.
2023-05-12 07:23 AM
Yeah, there are definitely some holes in the app note. After not getting a response on this for a couple of weeks, I gave aci_gap_init_IDB05A1 a try and it worked. So that solved my issue.
2023-05-12 01:06 AM
I have the same problem. I use a STM32L476 Nucleo board with Nucleo IDB05A2 BLE interface and have called the GAP init function from my own code (all I need is establish pairing with few phones since that is expected to be more secure than beacon (and I expect it deals with changing BLE MAC from the phones).
The BLE1 code in my project was installed as described in the ST Application Note and appear in my project in the Middleware directory. But the ST AN forgets to go further from there (ex. how to use GAP functions).
At present my project doesn't compile at all. I already modified some ST sources by including headers etc. But the compiler error list is huge and it gives me low confidence what I do to fix is OK. A good practice for this would be ST lets an AE with limit BLE knowledge struggle to get it functional based on their own AN. That identifies all the gaps in the AN.
2023-05-12 07:23 AM
Yeah, there are definitely some holes in the app note. After not getting a response on this for a couple of weeks, I gave aci_gap_init_IDB05A1 a try and it worked. So that solved my issue.
2023-05-13
11:06 AM
- last edited on
2023-12-06
05:14 AM
by
Laurids_PETERSE
FYI so far I'm able to compile my project. But I still consider the documentation is a bunch of junk. Sometimes I wonder if people writing this kind of code realize others cannot look in somebody else' head. For example the return value of most GAP functions:
One has to look in the code to determine what value indicates success or what errors may be returned.
Another example is for instance when a timing parameter is passed to a function. For instance called "Timeout". Explained as "Timeout". Software guys: please consider if the comment has any value. If not, don't put any or change it. In this case, the missing info are unit, limits (ex. what happens if 0 is passed? Will it wait very long or not at all?) etc.