Open fbgencer opened 4 years ago
Hi @fbgencer ,
esp_ble_gattc_close, from your description, there are certain problems with the behavior of this api.
In order to solve this problem faster, can you provide the code to use this API esp_ble_gattc_close?
I will also reproduce this problem locally.
@fbgencer Has the issue been solved?
Environment
Problem Description
I have two devices which I can connect them succesfully via
esp_ble_gattc_app_register
andesp_ble_gattc_open
functions. Also when callback returns conn_id and gattc_if values, clients update their conn_id and gattc_if.For disconnection I was using
esp_ble_gattc_close
which takes two inputs gatt_if and conn_id, which succesfully disconnects from one device. However when I have two connections, theesp_ble_gattc_close
request returns me the following warning on my terminal :First of all, clients have conn_id: 0 and conn_id:1 not 3 and 4 as printed in the warning. Printed gattc_if values match with previosly returned gattc_if (they were taken when
ESP_GATTC_REG_EVT
event is invoked). Disconnection reason is also checkhed which isESP_GATT_CONN_TERMINATE_LOCAL_HOST
, and true because I requested this event.Expected Behavior
Disconnection should occur for a requested client only, esp should not close all connections.
Actual Behavior
ESP Disconnects from all clients instead of the expected client.