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

Multiple Advertising Sets Error - nRF52832

Hello,

I am developing Bluetooth 5.0 application which advertises two different beacon advertising data sets (Each set with different advertising interval) 

I am using PCA10040 (nRF52832 based board) and Softdevice v6.1.0 for this application.

When i have set second advertising data-set with sd_ble_gap_adv_set_configure(&m_adv_handle_2, &m_adv_data_2, &m_adv_params_2) call, i got an error of not having enough memory (NRF_ERROR_NO_MEM).

After that i decreased the Application RAM size multiple times in the linker file ble_app_beacon_gcc_nrf52.ld.

Still i am getting the the same error of not having enough memory.

Kindly suggest me solution.

Parents
  • Hi,

    NRF_ERROR_NO_MEM is returned because there is mot enough memory to configure a new advertising handle. Currently only one advertising set can be configured in the SoftDevice. The solution is to reuse the existing advertising handle you have. 

    Couple of notes regarding how to update advertising data while advertising:

    1. Pass NULL to the third parameter for sd_ble_gap_adv_set_configure() as it is not possible to change the advertisment parameters while advertising

    2. Make sure to swap between two buffers when you update the advertising data. From API documentation: To update advertising data while advertising, provide new buffers to @ref sd_ble_gap_adv_set_configure.

Reply
  • Hi,

    NRF_ERROR_NO_MEM is returned because there is mot enough memory to configure a new advertising handle. Currently only one advertising set can be configured in the SoftDevice. The solution is to reuse the existing advertising handle you have. 

    Couple of notes regarding how to update advertising data while advertising:

    1. Pass NULL to the third parameter for sd_ble_gap_adv_set_configure() as it is not possible to change the advertisment parameters while advertising

    2. Make sure to swap between two buffers when you update the advertising data. From API documentation: To update advertising data while advertising, provide new buffers to @ref sd_ble_gap_adv_set_configure.

Children
Related