]> granicus.if.org Git - esp-idf/commitdiff
Component/bt: fix multi-connection failed
authorzhiweijian <zhiweijian@espressif.com>
Thu, 28 Sep 2017 07:05:44 +0000 (15:05 +0800)
committerzhiweijian <zhiweijian@espressif.com>
Sat, 30 Sep 2017 08:30:43 +0000 (16:30 +0800)
- modify some comments

components/bt/bluedroid/api/include/esp_gap_ble_api.h
components/bt/bluedroid/stack/l2cap/l2c_ble.c

index 9292f95e6b22392062b8056d97e9d345e4d18358..083e0beef4aabc31613b9f367145234404c99335 100644 (file)
@@ -972,6 +972,12 @@ esp_err_t esp_ble_get_bond_device_list(int *dev_num, esp_ble_bond_dev_t *dev_lis
 
 /**
 * @brief           This function is to disconnect the physical connection of the peer device
+*                  gattc maybe have multiple virtual GATT server connections when multiple app_id registed.
+*                  esp_ble_gattc_close (esp_gatt_if_t gattc_if, uint16_t conn_id) only close one virtual GATT server connection.
+*                  if there exist other virtual GATT server connections, it does not disconnect the physical connection.
+*                  esp_ble_gap_disconnect(esp_bd_addr_t remote_device) disconnect the physical connection directly.
+*
+*
 *
 * @param[in]       remote_device : BD address of the peer device
 *
index 96498b1d343546220944da26f2469fde03a241ce..0332366d8fd89200e51d01237a770cdc8f462dd0 100644 (file)
@@ -505,8 +505,8 @@ static BOOLEAN l2cble_start_conn_update (tL2C_LCB *p_lcb)
            up to what has been requested during connection establishement */
         if (p_lcb->conn_update_mask & L2C_BLE_NOT_DEFAULT_PARAM &&
                 /* current connection interval is greater than default min */
-                p_lcb->waiting_update_conn_min_interval > BTM_BLE_CONN_INT_MIN) {
-            /* use 7.5 ms as fast connection parameter, 0 slave latency */
+                p_lcb->current_used_conn_interval > BTM_BLE_CONN_INT_MAX_DEF) {
+            /* use 6 * 1.25 = 7.5 ms as fast connection parameter, 0 slave latency */
             min_conn_int = max_conn_int = BTM_BLE_CONN_INT_MIN;
             slave_latency = BTM_BLE_CONN_SLAVE_LATENCY_DEF;
             supervision_tout = BTM_BLE_CONN_TIMEOUT_DEF;