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

Beaconing while in connected state

SDK 16, S132 V7.0.1, NRF52832, custom device, custom firmware.

Hello,

I want to keep beaconing advertisement (not connectable advertisement) while the BLE is connected to a central device.

In my firmware I have a scheduler that run Connectivity advertisement and beaconing advertisement at the same time, but when the BLE is connected the beaconing advertisement is stopped.

What I do when BLE_GAP_EVT_CONNECTED is received is :

1- Disabling GAP advertisement

2- Setting beaconing interval and duration

3- Then enable beaconing advertisement:

      ret = sd_ble_gap_adv_set_configure(&adv_handle, adv[active_advertiser].p_data, adv[active_advertiser].p_params);
  
    if (ret == NRF_SUCCESS) {
       ret = sd_ble_gap_adv_start(adv_handle, adv[active_advertiser].conn_cfg_tag);
    }

The beaconing config is : duration 0 interval 1000ms

The issue is that the beaconing advertisement didn't start and there is no error returned by sd_ble_gap_adv_start().

With my config is it possible to run connectivity and beaconing in the same time without disconnecting the BLE?

What can I do to resolve this issue.

Thanks

Hamza.

Parents
  • Hello, I tried starting advertisement from the main and it doesn't start (no error returned)
    And when I incremented the value of the flags NRF_SDH_BLE_PERIPHERAL_LINK_COUNT and NRF_SDH_BLE_TOTAL_LINK_COUNT I get errors : 

    1- err_code = ble_advertising_init(&mm_advertising, &init);    ==> error = 12289 = 0x3001 = BLE_ERROR_NOT_ENABLED

    2- err_code = sq_ble_gap_tx_power_set()   ==> error = 1 = 0x0001 = NRF_ERROR_SVC_HANDLER_MISSING

    In the code before the first error I enable the SD!

Reply
  • Hello, I tried starting advertisement from the main and it doesn't start (no error returned)
    And when I incremented the value of the flags NRF_SDH_BLE_PERIPHERAL_LINK_COUNT and NRF_SDH_BLE_TOTAL_LINK_COUNT I get errors : 

    1- err_code = ble_advertising_init(&mm_advertising, &init);    ==> error = 12289 = 0x3001 = BLE_ERROR_NOT_ENABLED

    2- err_code = sq_ble_gap_tx_power_set()   ==> error = 1 = 0x0001 = NRF_ERROR_SVC_HANDLER_MISSING

    In the code before the first error I enable the SD!

Children
Related