2 years, 7 months ago.

BLE on Nucleo-L476RG with X-NUCLEO-IDB05A1

Hello,

I wanted to try BLE on my Nucleo-L476RG Board with a BLE shield: the X-NUCLEO-IDB05A1. So first, I tried the mbed-os-example-ble-Beacon and it worked. When I looked on the application nRF connect on my phone, I could see my BLE device. However, when I tried with the mbed-os-example-ble-HeartRate example, it didn't work. It seems to be the line ble.gap().startAdvertising(); that doesn't work. Indeed, it returns BLE_STACK_BUSY everytime. Is there someone that has this problem with the X-NUCLEO-IDB05A1 shield and know what happen ?

Thank you, Julien

I finally found what is the problem. After some debugging, I saw that the reset time of the shield on the mbed library was not the same as on the STM Cube Expansion BLE. Indeed, on mbed, the wait time is only of 5us between the reset and 505us after the reset when it is of 5ms in the cube. When I changed the wait_us(5); by wait_ms(5) in the reset function of the BlueNRGDevice.cpp file, everything worked fine.

Julien

posted by Julien Quere 29 Mar 2017
Comment on this question

1 Answer

2 years, 6 months ago.

Hi Julien, I also am working with the L476/5A1. Thanks for posting, I was noticing issue with reset between different versions of the 5A1 code.

Did you have to change anything else? My (very very simple) code is failing on BLE::Instance.init(...). If I turn on the PRINTFs in the 5A1 library I see the debug statements from btle.cpp:

btleInit>> GATT_Init failed. GAP_Init failed. Auth Req set failed.

: : I try to start scanning during the init callback...

scanningParams.getInterval()=100[msec] scanningParams.getWindow()=100[msec] Observation Procedure not implemented!!!

... and clearly scan fails because it didn't initialize... but I'm wondering if there was anything else you had to change in the hardware or in the mbed_app.json?

Thanks! Peter


You need to log in to post a question