ESP32 BLE 问题

liaojiankun
Posts: 1
Joined: Tue Aug 17, 2021 6:39 am

ESP32 BLE 问题

Postby liaojiankun » Tue Aug 17, 2021 6:42 am

我有以下2个疑问想请教一下
1.ESP32是否具有BLE从机和主机角色同时运行并且同时连接的能力
2.ESP32 BLE的从机demo是否支持多连接

ESP_XuLZ
Posts: 173
Joined: Fri Mar 26, 2021 6:04 am

Re: ESP32 BLE 问题

Postby ESP_XuLZ » Wed Aug 18, 2021 3:17 am

1、问题1可以主机从机同时运行并都可连接,我们有相关 demo : https://github.com/espressif/esp-idf/tr ... gatts_coex

2. 从机demo gatt_server 和 gatt_server_service_table 可以支持多连接,可以在首个连接完成的事件后,如 ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT 后, 重新开启广播 esp_ble_gap_start_advertising(&adv_params) 进行下一个连接

sheng907
Posts: 1
Joined: Thu Aug 19, 2021 2:06 am

Re: ESP32 BLE 问题

Postby sheng907 » Thu Aug 19, 2021 2:09 am

打擾想藉由這個標題延伸討論

1. 前面已說到從機與主機腳色可以同時工作,
那想請問當同時工作時,在主機腳色或從機腳色時可以個別跟多個從機與主機連結嗎

ESP_XuLZ
Posts: 173
Joined: Fri Mar 26, 2021 6:04 am

Re: ESP32 BLE 问题

Postby ESP_XuLZ » Thu Aug 19, 2021 5:23 am

同一设备上的主机和从机都可以进行多连接,理论上没有连接限制,且不会相互影响

Who is online

Users browsing this forum: No registered users and 138 guests