BLE multiple peripheral connect

Fahad_K_R
Posts: 1
Joined: Sun Mar 10, 2024 5:10 pm

BLE multiple peripheral connect

Postby Fahad_K_R » Mon Mar 11, 2024 8:50 am

I am using ESP32-IDF BLE with NimBLE stack. I want to connect 2 peripheral devices with my board. I can successfully connect 2 devices and after the connection I am calling the API for discover services for the first device, and then second device. I am getting the services and characteristics of both devices mixed up not one after the another. The code is...
image (2).png
image (2).png (23.07 KiB) Viewed 453 times
The output is ...
image (3).png
image (3).png (27.89 KiB) Viewed 453 times
I tried with adding delay between API and tried with semaphore for synchronization, but then not going to the service discovery callback function for any device. So I commented the delay.
The output is...
img 4.png
img 4.png (19.69 KiB) Viewed 453 times
I tried with the example "ble_multi_conn_cent" but I getting the error function "ble_gap_multi_connect" is not declared and the structure "ble_gap_multi_conn_params" not declared.

Can someone help me with this issue.

Who is online

Users browsing this forum: Baidu [Spider] and 82 guests