Skip to content

Commit 6b7a13f

Browse files
authored
Merge pull request #10580 from paul-szczepanek-arm/fix-hardcoded-acl
BLE: put the acl buffer size in config
2 parents d4122b0 + ebcff4b commit 6b7a13f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@
4848
"macro_name": "SMP_DB_MAX_DEVICES"
4949
},
5050
"desired-att-mtu": {
51-
"help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).",
51+
"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).",
5252
"value": 23
5353
},
54+
"rx-acl-buffer-size": {
55+
"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.",
56+
"value": 100
57+
},
5458
"max-prepared-writes": {
5559
"help": "Number of queued prepare writes supported by server.",
5660
"value": 4

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void BLE::stack_setup()
510510

511511
stack_handler_id = WsfOsSetNextHandler(&BLE::stack_handler);
512512

513-
HciSetMaxRxAclLen(100);
513+
HciSetMaxRxAclLen(MBED_CONF_CORDIO_RX_ACL_BUFFER_SIZE);
514514

515515
DmRegister(BLE::device_manager_cb);
516516
#if BLE_FEATURE_CONNECTABLE

0 commit comments

Comments
 (0)