HI
I am currently using the 3.0.0 SDK's periodic_sync_conn and periodic_adv_conn examples.
In the periodic_adv_conn example, I have configured 100 subevents.
Below is the source code from the periodic_sync_conn example:
err = bt_le_scan_start(BT_LE_SCAN_ACTIVE, NULL);
if (err) {
printk("failed (err %d)\n", err);
return 0;
}
err = k_sem_take(&sem_per_adv, K_FOREVER);
if (err) {
printk("failed (err %d)\n", err);
return 0;
}
printk("Found periodic advertising.\n");
printk("Creating Periodic Advertising Sync");
bt_addr_le_copy(&sync_create_param.addr, &per_addr);
sync_create_param.options = 0;
sync_create_param.sid = per_sid;
sync_create_param.skip = 5;
sync_create_param.timeout = 0x3000;
err = bt_le_per_adv_sync_create(&sync_create_param, &sync);
if (err) {
printk("Failed to create sync (err %d)\n", err);
return 0;
}
printk("Waiting for periodic sync\n");
err = k_sem_take(&sem_per_sync, K_FOREVER);
After scanning and detecting the extended advertising packet, the example calls bt_le_per_adv_sync_create to establish synchronization. However, I've noticed that the sync_cb callback only gets triggered when subevent 0 is received. For other subevents, the sync_cb function is not called. Why is this happening? The device has to continuously listen for a long time until subevent 0 arrives before the synchronization creation stops.
Thanks