ble_advertising_start() failed with errCode 0x8

I would like to start advertising after BLE connection disconnected. But ble_advertising_start() return errCode 0x8.

static void ble_evt_handler(ble_evt_t const* pBleEvt, void* pContext)
{
    switch (pBleEvt->header.evt_id)
    {
        case BLE_GAP_EVT_DISCONNECTED:
        {
            NRF_LOG_INFO("BLE_GAP_EVT_DISCONNECTED\n");
            advertisingStart();
        }    
        break;
    ...
    }
    ...
}

The following is log message of nRF52832 device.

00> <info> app: POWER_ON.
00> <info> app: BLE_ADV_EVT_FAST
00> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
00> <info> app: PM_EVT_BONDED_PEER_CONNECTED
00> <info> app: BLE_GAP_EVT_CONNECTED
00> <info> app: PM_EVT_CONN_SEC_SUCCEEDED
00> <info> app: Connection secured: role: 1, conn_handle: 0x0, procedure: 0.
00> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
00> <debug> app: _securityRequestHandler
00> <info> app: PM_EVT_CONN_SEC_CONFIG_REQ
00> <info> app: BLE_GAP_EVT_SEC_PARAMS_REQUEST
00> <info> app: PM_EVT_CONN_SEC_SUCCEEDED
00> <info> app: Connection secured: role: 1, conn_handle: 0x0, procedure: 1.
00> <info> app: BLE_GAP_EVT_AUTH_STATUS
00> <info> app: BLE_ADV_EVT_FAST
00> <info> app: BLE_GAP_EVT_DISCONNECTED
00> <warning> app: ble_advertising_start() failed errCode=0x8

Parents Reply Children
Related