espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.43k stars 7.25k forks source link

Multi connection issue with BLE and esp32s3 (IDFGH-6135) #7814

Closed twomas closed 2 years ago

twomas commented 2 years ago

Environment

Problem Description

This issue is only seen for esp2s3. Same application for esp32 seems to be ok. See attached picture esp32-esp32s3

The sequence working is when central connection is made before the peripheral connection.

The sequence that is not working is when the peripheral connection already exist when trying to establish the central connection, marked red in picture.

After esp_ble_gattc_open this is seen "BT_L2CAP: L2CA_CancelBleConnectReq - no connection pending"

xiewenxiang commented 2 years ago

Hi @twomas

I want to reproduce this issues.

The IDF version is release/v4.4 commit:b86fe0c66ca.

I test with gattc_gatts_coex example and gatt_server_service_table example.

ESP32-S3-DevKitC-1 download the gattc_gatts_coex.bin, ESP32-DevKit-V4 download the gatt_server_service_table.bin.

When the chip was power on, I did two tests:

Test 1:

ESP32S3(central) connects to the ESP32(peripheral), then, the PC(central) connects to ESP32S3(peripheral).

Test 2:

the PC(central) connects to ESP32S3(peripheral), then, ESP32S3(central) connects to the ESP32(peripheral).

Both of these conditions worked in my tests. I am not sure whether my retest method is different from yours. Could you please help confirm it.

twomas commented 2 years ago

Hi @xiewenxiang It seems to be device related. I just noticed if don't use our Windows BLE device in the picture above it seems to work better. So if I use our Android app instead of the Windows BLE device I manage to do the central connection after peripheral connection.

zztiger123 commented 2 years ago

Hi @twomas ,

Good day.

May I know if the issue was solved or if you still have any questions about this issue?

twomas commented 2 years ago

Hi @zztiger123

Seems to work better now. I close this.

twomas commented 2 years ago

We modified our connection parameter config. Seems to be related to this