5 years, 7 months ago.

nRF51-DK Crashing with Example Code

We are using the nRF51-DK for development of a product and are having difficulty with BLE code crashing. We started off with taking the BLE Health Thermometer example code and modifying it for our own use. However, we can't get it to run longer than 8 minutes before it crashes. The LED on LED1 will hang and the BLE device will disconnect in nRF connect. After some tinkering with the code, we found the only way to keep it from freezing is by commenting out our codes equivalent to the "thermometerServicePtr->updateTemperature(currentTemperature);" function. Curious, we decided to go back to the base code and build up from there to see which piece of code was causing the crash to happen. However, even after creating a new project via the example project, we are still experiencing the same crashing error after around 8 minutes with the LED freezing and the BLE device disconnecting. We tried with different BLE Example projects for the nRF51-DK and all are experiencing the same issue. And, given it is happening even in the example code, we're not sure we even have a way to debug it.

I've found another question that seems to be describing a similar issue here: https://os.mbed.com/questions/69629/nRF51822-keeps-crashing-after-random-dur/

However, it seems to be different as they weren't receiving a disconnection issue while we are.

Is there a known issue with the BLE Stack causing this to happen?

Question relating to:

Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

After some more looking around, it seems that I'm getting a "GATT CONN TIMEOUT" from my Android phone. A link I found online says it's related to the serial bus, but it also say it's been fixed already.

posted by Seth Leija 26 Apr 2019

It seems that MBED is uninterested in this issue. Our company will be moving away from it as a platform.

posted by Seth Leija 07 May 2019

Hi Seth,

I am trying to reproduce your issue but with no luck, here are my steps.

1. Build BLE_Thermometer app with Mbed OS 5.11.5 on NRF51_DK.

2. Use nRFConnect to connect to "Thermo", and do nothing just let it maintain the connection for 30 mins.

3. Since no crash happened, I enabled the Notification of "Temperature Measurement".

4. After 30mins, it still works properly.

Could you give me some advice for reproducing your problem if you are still interested in this issue.

Regards,

Desmond

posted by Desmond Chen 20 May 2019

Desmond,

1. There is no BLE_Thermometer app example for Mbed OS 5 on the Mbed compiler. Is there a way to compile Mbed OS 2 code under Mbed OS 5? 2. We went with Mbed OS 2 because we found it had more resources on how to create your own custom characteristics and services. Do these exist for Mbed OS 5 as well?

Regards, Seth

posted by Seth Leija 20 May 2019
Be the first to answer this question.

Assigned to Seth Leija 5 years, 6 months ago.

This means that the question has been accepted and is being worked on.