20 Peripheral Connections to 1 Central

I am trying to get the S132 Central Multilink example to run with 20 peripherals instead of 8.  So far, I have made the following modifications:

In sdk_config:



In the linker I increase the ram reserved for the Softdevice to 512 bytes larger than it requested when enabling the sdk.

In app_util.h

Fixed all macros so that it would support > 15 of 1 type.  MACRO_REPEAT_FOR_... and all others

In main.c

#define SCAN_INTERVAL 192 // 240ms /**< Determines scan interval in units of 0.625 millisecond. */
#define SCAN_WINDOW 40 // 25ms /**< Determines scan window in units of 0.625 millisecond. */
#define SCAN_TIMEOUT 0 /**< Timout when scanning. 0x0000 disables timeout. */

#define MIN_CONNECTION_INTERVAL MSEC_TO_UNITS(96, UNIT_1_25_MS) /**< Determines minimum connection interval in milliseconds. */
#define MAX_CONNECTION_INTERVAL MSEC_TO_UNITS(96, UNIT_1_25_MS) /**< Determines maximum connection interval in milliseconds. */
#define SLAVE_LATENCY 0 /**< Determines slave latency in terms of connection events. */
#define SUPERVISION_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**< Determines supervision time-out in units of 10 milliseconds. */

// schedule should look like this:
// 120ms Connection Interval
// 75ms - 3.75 * 20 Peripheral Connection Intervals
// 25ms - Scan Window - occurs on every other packet (240ms)
// spare 20ms, just in case?

This works well up to about 8 connections.  Going up to 10 causes the system to become unstable and stop working.  Sometimes it appears the central has crashed (and I can see all the NRF_Blinky peripherals advertising).  Other times it appears that the central is still connected to the peripherals but no longer functions.

Any ideas?

  • Hi,

    Before potentially digging deeper into this and looking up data from our own testing of high link counts, I would you to try this with more forgiving parameters. With a pretty much full packed schedule, I doubt the SoftDevice is able to find a suitable schedule.

    I recommend setting the connection interval a lot higher to see if you can get 20 stable links and then lowering the interval to see how low you are able to go. (While you are at it, you may want to increase the supervisor time-out just in case. 4000ms should be enough, but try setting it higher to be certain. You can lower it again later.)

    Best regards,
    Rune Holmgren