update configCentralConn value
This commit is contained in:
1 parent
f16576b70c
commit
203d9bd3f3
3 files changed
+9
-7
No files matched your search
@@ -33,8 +33,6 @@ void setup()
|
||||
|
||||
Serial.println("Bluefruit52 Central HID (Keyboard + Mouse) Example");
|
||||
Serial.println("--------------------------------------------------\n");
|
||||
|
||||
Bluefruit.configCentralConn(23, 3, 1, 3);
|
||||
|
||||
// Initialize Bluefruit with maximum connections as Peripheral = 0, Central = 1
|
||||
// SRAM usage required by SoftDevice will increase dramatically with number of connections
|
||||
|
||||
@@ -331,13 +331,17 @@ void BLEGap::_eventHandler(ble_evt_t* evt)
|
||||
// Bonding process completed
|
||||
ble_gap_evt_auth_status_t* status = &evt->evt.gap_evt.params.auth_status;
|
||||
|
||||
// Pairing/Bonding succeeded --> save encryption keys
|
||||
// Pairing succeeded --> save encryption keys ( Bonding )
|
||||
if (BLE_GAP_SEC_STATUS_SUCCESS == status->auth_status)
|
||||
{
|
||||
peer->bonded = true;
|
||||
peer->ediv = peer->bond_data->own_enc.master_id.ediv;
|
||||
|
||||
bond_save_keys(conn_hdl, peer->bond_data);
|
||||
// TODO Skip bonding for central, implement re-establishment connection later.
|
||||
if ( peer->role == BLE_GAP_ROLE_PERIPH )
|
||||
{
|
||||
bond_save_keys(conn_hdl, peer->bond_data);
|
||||
}
|
||||
}else
|
||||
{
|
||||
PRINT_HEX(status->auth_status);
|
||||
|
||||
@@ -194,15 +194,15 @@ void AdafruitBluefruit::configCentralBandwidth(uint8_t bw)
|
||||
// TODO Bandwidth auto
|
||||
case BANDWIDTH_AUTO:
|
||||
case BANDWIDTH_NORMAL:
|
||||
configCentralConn(BLE_GATT_ATT_MTU_DEFAULT, BLE_GAP_EVENT_LENGTH_DEFAULT, BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT, BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT);
|
||||
configCentralConn(BLE_GATT_ATT_MTU_DEFAULT, BLE_GAP_EVENT_LENGTH_DEFAULT, BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT, 3);
|
||||
break;
|
||||
|
||||
case BANDWIDTH_HIGH:
|
||||
configCentralConn(128, 6, 2, BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT);
|
||||
configCentralConn(128, 6, 1, 3);
|
||||
break;
|
||||
|
||||
case BANDWIDTH_MAX:
|
||||
configCentralConn(247, 6, 3, BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT);
|
||||
configCentralConn(247, 6, 1, 3);
|
||||
break;
|
||||
|
||||
default: break;
|
||||
|
||||
Reference in new issue
Block a user