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

NRF52 advertising over Timeslot and softdevice

Hi,

I'm trying to advertise 2 packets simultaneously, connectable packet using the soft device and a becon packet using the timeslot. I'm using nrf52 SDK 14.0.0 and SD132 v 5.0.0

I followed the example in sdk v11 multiactivity_beacon : \examples\ble_peripheral\experimental_ble_app_multiactivity_beacon\hrs_advertiser 

I've used the advertiser_timeslot.c from the example to use for becon advertising. i've also enabled privacy in GAP mode, still not able to see the simultaneous advertisements. Is there anything else i should configure.

main function:

int main(void)
{
 
       
    uint32_t err_code;
    bool     erase_bonds;

    // Initialize.
    err_code = app_timer_init();
    APP_ERROR_CHECK(err_code);

    uart_init();
    log_init();

    buttons_leds_init(&erase_bonds);
    ble_stack_init();
    beacon_adv_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();

    NRF_LOG_INFO("UART Start!");
    err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);
    
    app_beacon_start();
    // Enter main loop.
    for (;;)
    {
        power_manage();
    }
}

gap_params_init_function()
static void gap_params_init(void)
{
    uint32_t                err_code;
    ble_gap_conn_params_t   gap_conn_params;
    ble_gap_conn_sec_mode_t sec_mode;
 
    ble_gap_privacy_params_t ble_gap_privacy_params = {0};
    
    ble_gap_privacy_params.privacy_mode = BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY;
    ble_gap_privacy_params.private_addr_type = BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE;
    ble_gap_privacy_params.private_addr_cycle_s = 900; //adress change cycle
    ble_gap_privacy_params.p_device_irk = NULL;


    err_code = sd_ble_gap_privacy_set(&ble_gap_privacy_params);
    APP_ERROR_CHECK(err_code);
        

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);

    err_code = sd_ble_gap_device_name_set(&sec_mode,
                                          (const uint8_t *) DEVICE_NAME,
                                          strlen(DEVICE_NAME));
    APP_ERROR_CHECK(err_code);

    memset(&gap_conn_params, 0, sizeof(gap_conn_params));

    gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
    gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
    gap_conn_params.slave_latency     = SLAVE_LATENCY;
    gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;

    err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
    APP_ERROR_CHECK(err_code);
                                          

}
Related