This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF_SD_BLE_API_VERSION

Hallo Community,

I am doing the example ble_app_uart using Eclipse, a SDK 13.00 and a board 10040, When i compile the main file I´ve problems with scan params:

#if (NRF_SD_BLE_API_VERSION <= 2)
    .selective   = 0,
    .p_whitelist = NULL,
#endif
#if (NRF_SD_BLE_API_VERSION >= 3)
    .use_whitelist = 0,
#endif

Eclipse recognize the NRF_SD_BLE_API_VERSION <=2 but the next lines, eclipse does not regocnize them.I look it up in the data field of ble_gap_scan_params_t Struct Reference .selective and .p_whitelist are avaible.

Eclipse just only recognize .use_whitelist = 0. Where can i check which API version does eclipse is using?

  • This is related to the softdevice version, and was written this way to be compatible with both s130 v2 and s132 v. >3. s132 v.4x.x. does not have .selective and .p_whitelist in its ble_gap_scan_params_t structure, but have the .use_whitelist variable.

    NRF_SD_BLE_API_VERSION must correspond to the major version number of the softdevice in use. I.e., '4' for s132 v.4.0.2. Pre-processor symbols are added in the Makefile, not in Eclipse. E.g.,

    CFLAGS += -DNRF_SD_BLE_API_VERSION=4.
    
  • Thanks Berg! my problem was solve

Related