bta_gattc_enqueue(), the gattc command queue is full问题

diyilala
Posts: 13
Joined: Wed Apr 20, 2022 3:22 am

bta_gattc_enqueue(), the gattc command queue is full问题

Postby diyilala » Fri Jul 22, 2022 8:04 am

管理员你好,我在ble_spp_client和ble_spp_server的基础上改写了一个从client向server发指令然后server回复一些数据的功能,我使用串口助手的自动发送功能,当client的发送间隔为20ms时回复数据都正常,但是一旦间隔更短比如10ms时就会显示如下问题:

[0;31mE (107623) BT_APPL: bta_gattc_enqueue(), the gattc command queue is full.[0m

请问这个队列在什么位置,这个问题如何解决呢?

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

Re: bta_gattc_enqueue(), the gattc command queue is full问题

Postby ESP_XuLZ » Tue Jul 26, 2022 2:13 am

2022-07-26_10-02.png
2022-07-26_10-02.png (121.92 KiB) Viewed 1737 times
应该是 client 应用层发送的 write request 太快,而底层交互慢造成的
1. 可以使用 esp_ble_gap_update_conn_params 更新连接参数,减小连接间隔
2. 增大 MTU 和缓存发送数据至 MTU -3 长度后再发送, 应用层每包数据可以发 500 左右,如果使用 esp_ble_gattc_write_char 多次发很短的数据,底层交互包的数量多速度就慢,也挺浪费资源的

关于 BLE 吞吐量的测试请参考以下示例:https://github.com/espressif/esp-idf/tr ... throughput

Who is online

Users browsing this forum: No registered users and 146 guests