From 2311112cc3ff06bfd4034af65cb37140733b3838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Mon, 4 Oct 2021 17:09:23 +0200 Subject: [PATCH] [nrfconnect] speed up BLE configuration (#10178) --- .../app/overlay-multi_image_dfu_support.conf | 4 ++-- .../app/overlay-single_image_dfu_support.conf | 4 ++-- config/nrfconnect/app/sample-defaults.conf | 3 +++ .../boards/nrf52840dk_nrf52840.conf | 17 ++++++++++++++ .../boards/nrf52840dongle_nrf52840.conf | 2 ++ .../child_image/multiprotocol_rpmsg.conf | 22 +++++++++++++++++++ .../boards/nrf52840dk_nrf52840.conf | 17 ++++++++++++++ .../child_image/multiprotocol_rpmsg.conf | 22 +++++++++++++++++++ .../boards/nrf52840dk_nrf52840.conf | 17 ++++++++++++++ .../child_image/multiprotocol_rpmsg.conf | 22 +++++++++++++++++++ .../boards/nrf52840dk_nrf52840.conf | 17 ++++++++++++++ .../child_image/multiprotocol_rpmsg.conf | 22 +++++++++++++++++++ 12 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 examples/lighting-app/nrfconnect/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg.conf create mode 100644 examples/lock-app/nrfconnect/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg.conf create mode 100644 examples/pump-app/nrfconnect/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg.conf create mode 100644 examples/pump-controller-app/nrfconnect/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg.conf diff --git a/config/nrfconnect/app/overlay-multi_image_dfu_support.conf b/config/nrfconnect/app/overlay-multi_image_dfu_support.conf index ee99afa63b2429..7e78f41eaf2900 100644 --- a/config/nrfconnect/app/overlay-multi_image_dfu_support.conf +++ b/config/nrfconnect/app/overlay-multi_image_dfu_support.conf @@ -38,8 +38,8 @@ CONFIG_MCUMGR_SMP_BT_AUTHEN=n CONFIG_MCUMGR_BUF_COUNT=6 # Increase BT MTU and RX buffer for big size DFU messages -CONFIG_BT_L2CAP_TX_MTU=260 -CONFIG_BT_BUF_ACL_RX_SIZE=264 +CONFIG_BT_L2CAP_TX_MTU=498 +CONFIG_BT_BUF_ACL_RX_SIZE=502 # Increase system workqueue size, as SMP is processed within it CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2800 diff --git a/config/nrfconnect/app/overlay-single_image_dfu_support.conf b/config/nrfconnect/app/overlay-single_image_dfu_support.conf index a5d9820fc3faee..2b1670afdc5cb2 100644 --- a/config/nrfconnect/app/overlay-single_image_dfu_support.conf +++ b/config/nrfconnect/app/overlay-single_image_dfu_support.conf @@ -37,8 +37,8 @@ CONFIG_MCUMGR_SMP_BT_AUTHEN=n CONFIG_MCUMGR_BUF_COUNT=6 # Increase BT MTU and RX buffer for big size DFU messages -CONFIG_BT_L2CAP_TX_MTU=260 -CONFIG_BT_BUF_ACL_RX_SIZE=264 +CONFIG_BT_L2CAP_TX_MTU=498 +CONFIG_BT_BUF_ACL_RX_SIZE=502 # Increase system workqueue size, as SMP is processed within it CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2800 diff --git a/config/nrfconnect/app/sample-defaults.conf b/config/nrfconnect/app/sample-defaults.conf index 6d7f98e7db8f68..829ef8ef29c880 100644 --- a/config/nrfconnect/app/sample-defaults.conf +++ b/config/nrfconnect/app/sample-defaults.conf @@ -55,6 +55,9 @@ CONFIG_BT_DEVICE_APPEARANCE=0 CONFIG_BT_DEVICE_NAME_DYNAMIC=y CONFIG_BT_DEVICE_NAME_MAX=15 CONFIG_BT_MAX_CONN=1 +CONFIG_BT_L2CAP_TX_MTU=247 +CONFIG_BT_BUF_ACL_RX_SIZE=251 +CONFIG_BT_BUF_ACL_TX_SIZE=251 # Enable NFC support CONFIG_CHIP_NFC_COMMISSIONING=y diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dk_nrf52840.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..0b169c5894fab9 --- /dev/null +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index 57c8b9ceb1fdf7..bd8daf3a18feac 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -31,3 +31,5 @@ CONFIG_LOG_MODE_MINIMAL=n CONFIG_LOG_MODE_DEFERRED=y CONFIG_LOG_STRDUP_MAX_STRING=128 CONFIG_LOG_STRDUP_BUF_COUNT=24 + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg.conf b/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg.conf new file mode 100644 index 00000000000000..329d787b50feab --- /dev/null +++ b/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/lock-app/nrfconnect/boards/nrf52840dk_nrf52840.conf b/examples/lock-app/nrfconnect/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..0b169c5894fab9 --- /dev/null +++ b/examples/lock-app/nrfconnect/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg.conf b/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg.conf new file mode 100644 index 00000000000000..329d787b50feab --- /dev/null +++ b/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/pump-app/nrfconnect/boards/nrf52840dk_nrf52840.conf b/examples/pump-app/nrfconnect/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..0b169c5894fab9 --- /dev/null +++ b/examples/pump-app/nrfconnect/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg.conf b/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg.conf new file mode 100644 index 00000000000000..329d787b50feab --- /dev/null +++ b/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/pump-controller-app/nrfconnect/boards/nrf52840dk_nrf52840.conf b/examples/pump-controller-app/nrfconnect/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..0b169c5894fab9 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg.conf b/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg.conf new file mode 100644 index 00000000000000..329d787b50feab --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251