1 year, 3 months ago.

nRF52-DK example BLE_LED & BLE_Button not working


I am trying to run BLE_LED and BLE_Button from the example programs. The board LED's light up when I compile and load the program onto the board but my iPhone doesn't recognize the device with either LightBlue or nRF Connect. In the walk through for the BLE examples it said it should come up with the name as "LED" to connect to but nothing like that is listed after I do the scan. I am not sure if it has to do with my phone or if I need to change something in the code.


Comment on this question

1 Answer

1 year, 3 months ago.

Hi Sam,

Sorry that you are having issues with the examples! Are you using these examples from GitHub?:

These examples should work "as-is". Are there any failures when programming the board? If not, are you seeing LED1 blink periodically? You shouldn't need to power cycle the board after programming, but you can try to do so.

If you are using another BLE example, which is it?

If you are still having problems, what version of Mbed are you using and what tool chain are you building with? Are you using the Online Compiler or CLI?

-Ralph, Team Mbed

Hi Ralph,

Yes, I am trying to run the BLE_LED example from the mbed-os-example-ble folder on the Mbed Online Compiler for my nRF52-DK. I have copied the main.cpp and LEDSerivce.h files into my project and get the error 5 because the libraries cannot be found. I have tried loading the libraries since I get that project error 5 but the libraries don't come up under the Find Library Window. I don't have a lot of experience with Github and I have been trying to get it working last couple days but still haven't been able to.


posted by Samuel DeSantis 04 Aug 2018

Hi Sam,

We think you might be using an old Mbed OS2 project targeted for the nRF51 and that is causing the problem (as we came across a legacy project ourselves that wouldn't build). I've just packaged hopefully the same BLE LED example you want with OS5 and published that here:

Please bring that into your workspace using the yellow "Import into Compiler" button and give that a try. We're investigating an issue with the newer builds of Mbed not working for the nRF family so this is built against Mbed OS v5.9.1. It tested fine on the nRF52840-DK and we expect it to work on the nRF52-DK also.

Let us know how it goes.

posted by Ralph Fulchiero 07 Aug 2018

You need to log in to post a question