From 51a65b256d99ce98e958ae04d170b3557597bd1f Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 21 Nov 2019 14:37:14 +0100 Subject: [PATCH 1/3] pkg/nimble: used LL data length ext. with netif --- pkg/nimble/Makefile.include | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/nimble/Makefile.include b/pkg/nimble/Makefile.include index 7d3f899ff1..3eff6ceba6 100644 --- a/pkg/nimble/Makefile.include +++ b/pkg/nimble/Makefile.include @@ -90,6 +90,11 @@ ifneq (,$(filter nimble_netif,$(USEMODULE))) # NimBLEs internal buffer need to hold one IPv6 MTU per connection # for the internal MTU of 256 byte, we need 10 mbufs per connection... CFLAGS += -DMYNEWT_VAL_MSYS_1_BLOCK_COUNT=35 + + # optimize the NimBLE controller for IP traffic + ifneq (,$(filter nimble_controller,$(USEMODULE))) + CFLAGS += -DMYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT=1 + endif endif ifneq (,$(filter nimble_scanlist,$(USEMODULE))) INCLUDES += -I$(RIOTPKG)/nimble/scanlist/include From ffd8fc99764613f68688eed68ce6e067db8b6803 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 21 Nov 2019 16:55:48 +0100 Subject: [PATCH 2/3] pkg/nimble: bump version to 946cfb7 --- pkg/nimble/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/nimble/Makefile b/pkg/nimble/Makefile index 0c8d347ed6..828bb65d27 100644 --- a/pkg/nimble/Makefile +++ b/pkg/nimble/Makefile @@ -1,6 +1,6 @@ PKG_NAME = nimble PKG_URL = https://github.com/apache/mynewt-nimble.git -PKG_VERSION = fb7651b773734a075c47ff10210b92e6d55ef55b +PKG_VERSION = 946cfb7ff27fcf3adacebcd50c159b89d854fbf2 PKG_LICENSE = Apache-2.0 TDIR = $(RIOTPKG)/$(PKG_NAME) From 20af6616d6b84e98cd41f33f6b91fda5b50a03d4 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 16 Dec 2019 15:50:52 +0100 Subject: [PATCH 3/3] tests/nimble_l2cap: fix type passing AD to bluetil --- tests/nimble_l2cap/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/nimble_l2cap/main.c b/tests/nimble_l2cap/main.c index 33b5204d81..b1742922b7 100644 --- a/tests/nimble_l2cap/main.c +++ b/tests/nimble_l2cap/main.c @@ -143,7 +143,10 @@ static void _filter_and_connect(struct ble_gap_disc_desc *disc) int res; bluetil_ad_t ad; - bluetil_ad_init(&ad, disc->data, + + /* we use the bluetil module read-only here, so its save to cast the AD + * buffer to non-const */ + bluetil_ad_init(&ad, (uint8_t *)disc->data, (size_t)disc->length_data, (size_t)disc->length_data); res = bluetil_ad_find_and_cmp(&ad, BLE_GAP_AD_NAME, APP_NODENAME, (sizeof(APP_NODENAME) - 1));