Skip to content

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jan 31, 2020

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.

@dhalbert dhalbert requested a review from tannewt January 31, 2020 19:58
@ladyada
Copy link
Member

ladyada commented Jan 31, 2020

yes please! we have lots of RAM :)

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me! Thanks!

@dhalbert dhalbert merged commit 8258cb8 into adafruit:master Jan 31, 2020
@dhalbert dhalbert deleted the nrf-increase-connections branch January 31, 2020 21:04
@hathach
Copy link
Member

hathach commented Feb 1, 2020

Arduino can only afford up to 2,3 connections. I may need to improve the linker/heap memory to support more as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants