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

Advertising interferes with advertising in non-whitelisted mode

Hello,

We use the nRF52832 with SD 17.2.0, Bluetooth LE.

We observe an error when doing the following sequence:

- Build a bonded connection using the nRF Connect app.

- Trigger a disconnect.

- Trigger non-whitelisted advertising (via a button press but that should not matter) using the function 

err_code = ble_advertising_restart_without_whitelist(&m_advertising);

The disconnect triggers the advertising with whitelist while the non-whitelisted advertising is triggered at the same time and then the following error appears in the logs:

[00:02:15.000,000] <error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at :0
PC at: 0x00000000
[00:02:15.000,000] <error> app: End of error report
[00:02:15.000,000] <warning> app: System reset

It also happens when triggering advertising wih the whitelist upon button press:

ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);

How can we prevent this to happen?

Parents
  • Hello,

    I am not sure I understood correctly, but is the issue that you are starting your advertisements from two places at once? That typically triggers an NRF_ERROR_INVALID_STATE, and not the NRF_ERROR_INVALID_PARAM, but in case that is the issue, try adding the following option in your advertising_init() function:

    init.config.ble_adv_on_disconnect_disabled = true;

    If that is not the issue, then there is something wrong with your advertising set.Try to debug ble_advertising_start() and ble_advertising_restart_without_whitelist() and see what function call that returns the value NRF_ERROR_INVALID_PARAM.

    Best regards,

    Edvin

Reply
  • Hello,

    I am not sure I understood correctly, but is the issue that you are starting your advertisements from two places at once? That typically triggers an NRF_ERROR_INVALID_STATE, and not the NRF_ERROR_INVALID_PARAM, but in case that is the issue, try adding the following option in your advertising_init() function:

    init.config.ble_adv_on_disconnect_disabled = true;

    If that is not the issue, then there is something wrong with your advertising set.Try to debug ble_advertising_start() and ble_advertising_restart_without_whitelist() and see what function call that returns the value NRF_ERROR_INVALID_PARAM.

    Best regards,

    Edvin

Children
Related