From 064e8de93d4c45aeb134ea0ed41b9397c32455de Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Tue, 14 May 2019 16:52:24 +0100 Subject: [PATCH 1/3] put the acl buffer size in config --- features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json | 4 ++++ .../FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json index bad3e71734f..bf640c7efdc 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json @@ -51,6 +51,10 @@ "help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).", "value": 23 }, + "rx-acl-buffer-size": { + "help": "Size of the buffer holding the ACL packet. This will limit the effective ATT_MTU (to its value minus 4 bytes for the header). The size of the buffer must be small enough to be allocated from the existing cordio pool. If this value is increased you may need to adjust the memory pool.", + "value": 100 + }, "max-prepared-writes": { "help": "Number of queued prepare writes supported by server.", "value": 4 diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp index e4cadc531ca..94a6a97e36d 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp @@ -510,7 +510,7 @@ void BLE::stack_setup() stack_handler_id = WsfOsSetNextHandler(&BLE::stack_handler); - HciSetMaxRxAclLen(100); + HciSetMaxRxAclLen(MBED_CONF_CORDIO_RX_ACL_BUFFER_SIZE); DmRegister(BLE::device_manager_cb); #if BLE_FEATURE_CONNECTABLE From 26fe4dd1746d765f6080736b962821b3f79c28c3 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Tue, 14 May 2019 16:57:14 +0100 Subject: [PATCH 2/3] add info on rx acl buf size --- features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json index bf640c7efdc..1bb0d7dee8e 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json @@ -48,7 +48,7 @@ "macro_name": "SMP_DB_MAX_DEVICES" }, "desired-att-mtu": { - "help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).", + "help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive). The effective ATT_MTU is limited by rx-acl-buffer-size (minus 4 bytes for the header).", "value": 23 }, "rx-acl-buffer-size": { From ebcff4b2d20a880a1ecf8419c5954167ac1396a0 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Wed, 15 May 2019 13:25:28 +0100 Subject: [PATCH 3/3] improve wording of the docs --- features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json index 1bb0d7dee8e..969d25346e4 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json @@ -52,7 +52,7 @@ "value": 23 }, "rx-acl-buffer-size": { - "help": "Size of the buffer holding the ACL packet. This will limit the effective ATT_MTU (to its value minus 4 bytes for the header). The size of the buffer must be small enough to be allocated from the existing cordio pool. If this value is increased you may need to adjust the memory pool.", + "help": "Size of the buffer holding the reassembled complete ACL packet. This will limit the effective ATT_MTU (to its value minus 4 bytes for the header). The size of the buffer must be small enough to be allocated from the existing cordio pool. If this value is increased you may need to adjust the memory pool.", "value": 100 }, "max-prepared-writes": {