From e840b61091f5a9cec45d96b8cc28f2d96bc136dc Mon Sep 17 00:00:00 2001 From: Hendrik van Essen Date: Fri, 17 Dec 2021 02:31:01 +0100 Subject: [PATCH] pkg/nimble: configure nimble values for stdio_nimble --- pkg/nimble/Makefile.include | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/nimble/Makefile.include b/pkg/nimble/Makefile.include index 099fc815ad..813f0c16ab 100644 --- a/pkg/nimble/Makefile.include +++ b/pkg/nimble/Makefile.include @@ -135,6 +135,17 @@ ifneq (,$(filter nimble_netif,$(USEMODULE))) CFLAGS += -DMYNEWT_VAL_BLE_LL_CONN_INIT_SLOTS=1 CFLAGS += -DMYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT=1 endif +else + ifneq (,$(filter stdio_nimble,$(USEMODULE))) + # the maximum fragment size that we can receive. For maximum efficiency this + # should be equal to the maximum configured link layer packet size. + # WARNING: this value MUST never be larger than MYNEWT_VAL_BLE_LL_MAX_PKT_SIZE + CFLAGS += -DMYNEWT_VAL_BLE_L2CAP_COC_MPS=251 + + # in order to fit a 251 byte COC data segment into a single mbuf buffer, the + # used block size must be at least 297 byte (251 data + 48 overhead) + CFLAGS += -DMYNEWT_VAL_MSYS_1_BLOCK_SIZE="(MYNEWT_VAL_BLE_L2CAP_COC_MPS + 48)" + endif endif ifneq (,$(filter nimble_rpble,$(USEMODULE)))