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

OS5 BLE HRM example not connecting

07 Nov 2018

I imported from the examples page https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-HeartRate/ the latest and compiled it using the online compiler. Sent it to my nrf52DK (which I had installed the s132 softdevice on for a Nordic project). It advertised but connecting via nrf connect timed out. So then I sent it over a DipDap to a Taiyo Yuden nrf52832 EVkit and it connected fine (I'm pretty sure it had the s132 softdevice). Maybe the online compiler code does not include the softdevice? The compiled code (bin file) size was 233kb.

The thermometer app connected fine on the nrf52DK and a nordic app worked fine so HW is probably ok. The thermometer app compiled to 413kb as a hex file. In any case, if that was the problem then after installing the thermometer, then should the HRM should work? Anyway that trick doesn't work either.

  1. confused
07 Nov 2018

HRM code size 233kb (bin) Therm code size 414kb (hex)

08 Nov 2018

Got a tip from Austin B. to run the DAPLink FW update. I ran that. Had the same results, initially with HRMconnection failed. But after I installed the Thermometer and attempted connection twice it succeeded and went back and installed the HRM it succeed in connecting on the first try. Now it connects reliably.

I'm gonna chalk this one up to bad karma. At least if anyone else has the same problem and finds the forum discussion they can try same rain dance.

08 Nov 2018

Hi Dan,

We just checked the build of the Online Compiler for the Heart Rate Monitor example. We also see a binary output file generated that is 233KB in size. We programmed it up, can see LED 0 blink (from the periodicCallback()) and are able to connect to the board through the nRF Central app. So perhaps you can try that again if you are concerned about the integrity of the executable.

You are right in that the binary is smaller than the hex file and that would be expected. The hex file is in Intel Hex format which is ASCII with addressing information, while the binary is just the binary image which gets programmed at offset 0x0. If you open up the binary with a hex editor you'll see the Nordic vector table at 0x0 and the SoftDevice starting at 0x1000. Your application code will start at 0x23000.

Regards,

Ralph, Team Mbed