Skip to content

Commit

Permalink
Merge pull request #10580 from paul-szczepanek-arm/fix-hardcoded-acl
Browse files Browse the repository at this point in the history
BLE: put the acl buffer size in config
  • Loading branch information
0xc0170 committed May 20, 2019
2 parents d4122b0 + ebcff4b commit 6b7a13f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json
Expand Up @@ -48,9 +48,13 @@
"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": {
"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": {
"help": "Number of queued prepare writes supported by server.",
"value": 4
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 6b7a13f

Please sign in to comment.