Skip to content

Commit

Permalink
Merge branch 'optimize/ble_mesh_gattc_conn_param_v3.3' into 'release/…
Browse files Browse the repository at this point in the history
…v3.3'

ble_mesh: stack: Update connection parameters used by Central (v3.3)

See merge request espressif/esp-idf!11285
  • Loading branch information
Isl2017 committed Nov 19, 2020
2 parents adcab65 + 1a36790 commit 2c6eb0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,12 +1210,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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2c6eb0b

Please sign in to comment.