nRF5340 Advertising stopped without any indication

Hi,

We are using nRF5340 DK and the nRF Connect SDK Version 2.6.1.

We are developing a mesh network. Our requirement is the one device can connect to three other devices. Using one connection as a peripheral and up to two connections as a central for mesh connections.

We are using extended advertising.

When the master tries to connect to the slave, it receives a disconnection event with reason 19. However, on the slave side, there are no connection or disconnection events; but the advertising has stopped, and the following hci errors have occurred in the slave side:

 <err> bt_hci_core: bt_hci_le_enh_conn_complete: No pending conn for peer FF:F5:55:5A:D6:6A (random)
 <err> bt_hci_core: hci_acl: Unable to find conn for handle 6
<wrn> bt_hci_core: bt_hci_host_num_completed_packets: Unable to look up conn with index 0xff

After these errors occur, advertising stopped.

Here I have attached adv start function

struct bt_le_adv_param adv_param ={
            .id = BT_ID_DEFAULT,    
            .sid = setId,   /* Supply unique SID when creating advertising set */        
            .secondary_max_skip = 0U,            
            .interval_min = ADV_INTERVAL_MIN,
            .interval_max = ADV_INTERVAL_MAX,
            .peer = NULL,
    };

    
    adv_param.options = (BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_CONNECTABLE |BT_LE_ADV_OPT_ONE_TIME);


    /* Create a non-connectable non-scannable advertising set */
    err = bt_le_ext_adv_create(&adv_param, NULL, &adv[setId]);
    if (err) {
        printk("Failed to create advertising set %d (err %d)\n", setId, err);
        return err;
    }

    /* Set extended advertising data */
    err = bt_le_ext_adv_set_data(adv[setId], ad_ext, ARRAY_SIZE(ad_ext), NULL, 0);
    if (err) {
        printk("Failed to set advertising data for set %d " "(err %d)\n", setId, err);
        return err;
    }

    /* Start extended advertising set */
    err = bt_le_ext_adv_start(adv[setId], BT_LE_EXT_ADV_START_DEFAULT);
    if (err) {
        printk("Failed to start extended advertising set %d "  "(err %d)\n", setId, err);
        return err;
    }

1. What could be causing this issue?

2. How can we determine if the advertising is still active?

Related