Skip to content

Commit 1a506b5

Browse files
committed
Remove the process that automatically negotiates when connecting
Better to use the BLEConnection::requestConnectionParameter() function
1 parent d2f669e commit 1a506b5

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

libraries/Bluefruit52Lib/src/BLEPeriph.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,13 @@ void BLEPeriph::setDisconnectCallback( ble_disconnect_callback_t fp )
134134

135135
void BLEPeriph::_eventHandler(ble_evt_t* evt)
136136
{
137-
uint16_t const conn_hdl = evt->evt.common_evt.conn_handle;
137+
// uint16_t const conn_hdl = evt->evt.common_evt.conn_handle;
138138
// BLEConnection* conn = Bluefruit.Connection(conn_hdl);
139139

140140
switch ( evt->header.evt_id )
141141
{
142142
case BLE_GAP_EVT_CONNECTED:
143-
{
144-
ble_gap_evt_connected_t* para = &evt->evt.gap_evt.params.connected;
145-
146-
// Connection interval set by Central is out of preferred range
147-
// Try to negotiate with Central using our preferred values
148-
if ( !is_within(_ppcp.min_conn_interval, para->conn_params.min_conn_interval, _ppcp.max_conn_interval) )
149-
{
150-
VERIFY_STATUS( sd_ble_gap_conn_param_update(conn_hdl, &_ppcp), );
151-
}
152-
}
143+
153144
break;
154145

155146
case BLE_GAP_EVT_DISCONNECTED:

0 commit comments

Comments
 (0)