increase max BLE connections from 2 to 5 #2569
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Increase number of connections and other parameters for BLE.
Figuring 5 connections: 1 for workflow (not yet in use)
Connecting to 3 sensors + 1 other connection as a possible maxed-out application
Number of connections increased from 2 to 5.
Max number of peripheral roles increased from 2 to 4.
Max number of central roles increased from 1 to 4.
Increase size of attribute table by factor of 5 from default (was factor of 3).
Support up to 75 128-bit UUIDs (was 32).
Decreased notify/indicate tx queue size from 10 to 9 (each increment takes about 2kB, so these are expensive).
The above changes increase RAM used by SoftDevice from 32kiB to 64kiB.
Added experimental results of how much increasing each parameter affects RAM use
Fixed up max stack size check in .ld file.
Removed a
#define
for one of the values above which was defined in a different file and used only one place.We can fine-tune this later. I thought originally the stack size was 40kiB, but it's actually 24kiB right now, which is fine.