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:
Increased NRF_SDH_BLE_CENTRAL_LINK_COUNT to 20
Increased NRF_SDH_BLE_TOTAL_LINK_COUNT to 20
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?