Merge pull request #7211 from pan-/ble-workaround-connections-param-update-request

Nordic BLE: Accept connection parameter update
pull/7249/head
Cruz Monrreal 2018-06-18 10:09:22 -05:00 committed by GitHub
commit 701d49d8eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -215,6 +215,15 @@ void btle_handler(ble_evt_t *p_ble_evt)
break;
}
case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: {
Gap::Handle_t connection = p_ble_evt->evt.gap_evt.conn_handle;
const ble_gap_evt_conn_param_update_request_t *update_request =
&p_ble_evt->evt.gap_evt.params.conn_param_update_request;
sd_ble_gap_conn_param_update(connection, &update_request->conn_params);
break;
}
case BLE_GAP_EVT_TIMEOUT:
gap.processTimeoutEvent(static_cast<Gap::TimeoutSource_t>(p_ble_evt->evt.gap_evt.params.timeout.src));
break;

View File

@ -376,6 +376,14 @@ void btle_handler(const ble_evt_t *p_ble_evt)
break;
}
#endif
case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: {
Gap::Handle_t connection = p_ble_evt->evt.gap_evt.conn_handle;
const ble_gap_evt_conn_param_update_request_t *update_request =
&p_ble_evt->evt.gap_evt.params.conn_param_update_request;
sd_ble_gap_conn_param_update(connection, &update_request->conn_params);
break;
}
case BLE_GAP_EVT_TIMEOUT:
gap.processTimeoutEvent(static_cast<Gap::TimeoutSource_t>(p_ble_evt->evt.gap_evt.params.timeout.src));