From 2635af9a202537d5e2927acb53b08a02d83e2f4d Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 18 Aug 2022 07:51:39 +0200 Subject: [PATCH] pkg/nimble: fix event queue size for nimble_adv_ext If the Bluetooth 5 Advertising Extension is enabled by the `nimble_adv_ext` module, up to 3 events come in from the controller during connection establishment before they are processed by the host. The default size of the event queue `MYNEWT_VAL_BLE_TRANSPORT_EVT_COUNT` with only 2 entries is therefore too small and the connection establishment fails. --- pkg/nimble/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/nimble/Makefile.include b/pkg/nimble/Makefile.include index e647d581a4..993aab65fb 100644 --- a/pkg/nimble/Makefile.include +++ b/pkg/nimble/Makefile.include @@ -96,6 +96,7 @@ endif ifneq (,$(filter nimble_adv_ext,$(USEMODULE))) # extended advertising HCI events can be up to 257 bytes CFLAGS += -DMYNEWT_VAL_BLE_TRANSPORT_EVT_SIZE=257 + CFLAGS += -DMYNEWT_VAL_BLE_TRANSPORT_EVT_COUNT=4 CFLAGS += -DMYNEWT_VAL_BLE_EXT_ADV=1 CFLAGS += -DMYNEWT_VAL_BLE_LL_EXT_ADV_AUX_PTR_CNT=2 CFLAGS += -DMYNEWT_VAL_BLE_LL_SCAN_AUX_SEGMENT_CNT=1