From 56877b199d67a9c1ac7a8a4e82de09832695d085 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 6 Aug 2024 12:53:45 +0530 Subject: [PATCH] fix(nimble): Set data length after connection --- nimble/host/src/ble_gap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 33cdc4eb4..22577e445 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -2261,6 +2261,11 @@ ble_gap_rx_rd_rem_sup_feat_complete(const struct ble_hci_ev_le_subev_rd_rem_used ble_gap_event_listener_call(&event); ble_gap_call_conn_event_cb(&event, conn_handle); + +#if !SOC_ESP_NIMBLE_CONTROLLER + ble_hs_hci_util_set_data_len(le16toh(ev->conn_handle), BLE_HCI_SUGG_DEF_DATALEN_TX_OCTETS_MAX, + BLE_HCI_SUGG_DEF_DATALEN_TX_TIME_MAX); +#endif } ble_hs_unlock();