This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Do we need sd_ble_gap_enable().. in current s110 v7 code?

Reading the s110_nrf51822_7_0_0.migration document there's a small section which states that due to an issue in the release you need to do the following ..

sd_ble_gap_enable(p_ble_enable_params);
sd_ble_gap_address_get(&addr);
sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &addr);

after sd_ble_enable()

However checking the sample code in the nrf51 release, that code is not included in the samples.

Which is correct? Do we need to modify the sample code or is the note out of date?

--- UPDATE (I wish by the way you could ask secondary questions instead of editing your first one) ---

I see the answer below and thank you for it, however I'm now very confused. I built the ble heart rate app right from the source as given, with a few minor modifications so that it runs on the PCA10000 with no buttons and different lights.

The code to set the address isn't in there and I didn't add it, yet sniffing the connection with LightBlue shows the address is not zero, it's the default address for this particular nrf51822, I know it well!

I even checked the output elf file and ensured none of those three calls are in it, they aren't, they are compiled into the .o file and then dropped during link because they are not called. I even put one of them in and checked the elf file again, and there it was.

So I'm not calling this code, I do have this version of the softdevice loaded but it's working fine.

Parents Reply Children
Related