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

Examples using SDK 15

Hi,

Currently I'm upgrading our code base to SDK 15. At https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/migration.html?cp=4_0_1_1_9 there are some directions written down. Note, by the way that there is no migration guide for 15.1.0.

The function ble_advdata_set() has been deprecated. The reason is because sd_ble_gap_adv_data_set() has been removed from the SoftDevice API. Instead, you can use ble_advdata_encode() before calling the SoftDevice function sd_ble_gap_adv_set_configure.

You may need to call ble_advdata_encode() twice, because ble_advdata_set() might have both advertising data and scan response data as input. The function ble_advdata_encode() only encodes one at a time.

Advertising parameters are now part of sd_ble_gap_adv_set_configure() instead of sd_ble_gap_adv_start().

For some examples, we have moved the setting of advertising parameters so they are set together with advertising data.

Action: Replace calls to ble_advdata_set() with ble_advdata_encode(). Call sd_ble_gap_adv_set_configure() before calling sd_ble_gap_adv_start().

It starts advertising, however the advertisement data is still empty. I've been calling a sequence like:

  • nrf_sdh_ble_default_cfg
  • nrf_sdh_ble_enable
  • ble_advdata_encode
  • sd_ble_gap_adv_set_configure
  • sd_ble_gap_adv_start

You see, that I don't use the Advertisment Module. My question: Is there on github an example which uses the v15 sdk (normally, without advertisement module)?

I've already checked if the encoder is encoding properly etc. This all seems to be the case. Also, I don't get any errors anywhere, checking results of every softdevice call. I might have missed a function that I've to call so that's why an example would be perfect.

Kind regards,

Anne

Parents Reply Children
Related