Merge branch 'optimize/ble_mesh_gattc_conn_param' into 'master'

ble_mesh: stack: Update connection parameters used by Central

See merge request espressif/esp-idf!11243
This commit is contained in:
Island 2020-11-18 14:38:40 +08:00
commit 2c11c029bb
2 changed files with 12 additions and 12 deletions

View File

@ -1209,12 +1209,12 @@ int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, u16_t service_uuid)
BT_DBG("Create conn with %s", bt_hex(addr->val, BLE_MESH_ADDR_LEN));
/* Min_interval: 250ms
* Max_interval: 250ms
/* Min_interval: 15ms
* Max_interval: 15ms
* Slave_latency: 0x0
* Supervision_timeout: 32 sec
* Supervision_timeout: 1s
*/
BTA_DmSetBlePrefConnParams(bt_mesh_gattc_info[i].addr.val, 0xC8, 0xC8, 0x00, 0xC80);
BTA_DmSetBlePrefConnParams(bt_mesh_gattc_info[i].addr.val, 0x18, 0x18, 0x00, 0x64);
BTA_GATTC_Open(bt_mesh_gattc_if, bt_mesh_gattc_info[i].addr.val,
bt_mesh_gattc_info[i].addr.type, true, BTA_GATT_TRANSPORT_LE);

View File

@ -1424,18 +1424,18 @@ int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, u16_t service_uuid)
BT_DBG("Create conn with %s", bt_hex(addr->val, BLE_MESH_ADDR_LEN));
/* Min_interval: 250ms
* Max_interval: 250ms
/* Min_interval: 15ms
* Max_interval: 15ms
* Slave_latency: 0x0
* Supervision_timeout: 32 sec
* Supervision_timeout: 1s
*/
struct ble_gap_conn_params conn_params = {0};
conn_params.itvl_min = 0xC8; /* (250 * 1000) / 1250 = 200 = 0xC8 */
conn_params.itvl_max = 0xC8; /* (250 * 1000) / 1250 = 200 = 0xC8 */
conn_params.itvl_min = 0x18;
conn_params.itvl_max = 0x18;
conn_params.latency = 0;
conn_params.supervision_timeout = 0xC80;
conn_params.scan_itvl = 0x0020; //0x0010
conn_params.scan_window = 0x0020; //0x0010
conn_params.supervision_timeout = 0x64;
conn_params.scan_itvl = 0x0020;
conn_params.scan_window = 0x0020;
conn_params.min_ce_len = BLE_GAP_INITIAL_CONN_MIN_CE_LEN;
conn_params.max_ce_len = BLE_GAP_INITIAL_CONN_MAX_CE_LEN;