diff options
author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2020-06-25 23:06:00 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-07-01 22:49:04 +1000 |
commit | fc1f22a097ac2c6eb418605f36b53936e5138451 (patch) | |
tree | d101504b037336d37344051c958f2d03dfe4b395 | |
parent | 9dfb4ae6aacd5eb4317f7a474b9da00c1cec9088 (diff) |
nrf/bluetooth: Handle data length update request.
The Bluetooth link gets disconnected when connecting from a PC after 30-40
seconds. This commit adds handling of the data length update request. The
data length parameter pointer is set to NULL in the reply, letting the
SoftDevice automatically set values and use them in the data length update
procedure.
-rw-r--r-- | ports/nrf/drivers/bluetooth/ble_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c index 47f7f9888..1a64cdfbd 100644 --- a/ports/nrf/drivers/bluetooth/ble_drv.c +++ b/ports/nrf/drivers/bluetooth/ble_drv.c @@ -1131,6 +1131,12 @@ static void ble_evt_handler(ble_evt_t * p_ble_evt) { BLE_DRIVER_LOG("GATTS EVT EXCHANGE MTU REQUEST\n"); (void)sd_ble_gatts_exchange_mtu_reply(p_ble_evt->evt.gatts_evt.conn_handle, 23); // MAX MTU size break; + + case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST: + BLE_DRIVER_LOG("BLE GAP EVT DATA LENGTH UPDATE REQUEST\n"); + sd_ble_gap_data_length_update(p_ble_evt->evt.gap_evt.conn_handle, NULL, NULL); + break; + #endif // (BLUETOOTH_SD == 132) || (BLUETOOTH_SD == 140) default: |