This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52832 Maximum number of central links

HI, I found that the maximum number of connections 52832 can only be 15 connections, like this

// <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
#ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 15
#endif

When I set up more than 15 when the compiler will be wrong, I would like to know what method can set the maximum number of links to 20

I am using the example is :

nRF5_SDK_14.1.0_1dda907\examples\ble_central\ble_app_multilink_central\pca10040\s132\arm5_no_packs
Parents
  • Firstly maximum number of links and GAP/GATT roles doesn't depend on HW you use (nRF2832 in this case) but BLE stack you use! Then latest Nordic S140 and S132 stacks for nRF52 chips support up to 20 concurrent connection links so no, 15 is not the limit. Secondly if you are not fine with this limit you have two obvious choices: go with other stacks (e.g. Zephyr should support at least 32 links today) or develop your own!

    If you are fine with 20 and you just want to modify nRF5_SDK_14.1.0_1dda907.zip\examples\ble_central\ble_app_multilink_central example to handle more links then it has 8 central links configured in nRF5 SDK v14.1.0 and you can easily modify that in examples\ble_central\ble_app_multilink_central\pca10040\s132\config\sdk_config.h file by modifying following lines:

    // <h> nRF_SoftDevice 
    
    //==========================================================
    // <e> NRF_SDH_BLE_ENABLED - nrf_sdh_ble - SoftDevice BLE event handler
    //==========================================================
    #ifndef NRF_SDH_BLE_ENABLED
    #define NRF_SDH_BLE_ENABLED 1
    #endif
    // <h> BLE Stack configuration - Stack configuration parameters
    
    // <i> These values are not used directly by the SoftDevice handler but the application or other libraries might depend on them.
    // <i> Keep them up-to-date with the desired configuration.
    //==========================================================
    // <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
    #ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
    #define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0
    #endif
    
    // <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
    #ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
    #define NRF_SDH_BLE_CENTRAL_LINK_COUNT 8
    #endif
    
    // <o> NRF_SDH_BLE_TOTAL_LINK_COUNT - Maximum number of total concurrent connections using the default configuration. 
    #ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT
    #define NRF_SDH_BLE_TOTAL_LINK_COUNT 8
    #endif
    
Reply
  • Firstly maximum number of links and GAP/GATT roles doesn't depend on HW you use (nRF2832 in this case) but BLE stack you use! Then latest Nordic S140 and S132 stacks for nRF52 chips support up to 20 concurrent connection links so no, 15 is not the limit. Secondly if you are not fine with this limit you have two obvious choices: go with other stacks (e.g. Zephyr should support at least 32 links today) or develop your own!

    If you are fine with 20 and you just want to modify nRF5_SDK_14.1.0_1dda907.zip\examples\ble_central\ble_app_multilink_central example to handle more links then it has 8 central links configured in nRF5 SDK v14.1.0 and you can easily modify that in examples\ble_central\ble_app_multilink_central\pca10040\s132\config\sdk_config.h file by modifying following lines:

    // <h> nRF_SoftDevice 
    
    //==========================================================
    // <e> NRF_SDH_BLE_ENABLED - nrf_sdh_ble - SoftDevice BLE event handler
    //==========================================================
    #ifndef NRF_SDH_BLE_ENABLED
    #define NRF_SDH_BLE_ENABLED 1
    #endif
    // <h> BLE Stack configuration - Stack configuration parameters
    
    // <i> These values are not used directly by the SoftDevice handler but the application or other libraries might depend on them.
    // <i> Keep them up-to-date with the desired configuration.
    //==========================================================
    // <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
    #ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
    #define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0
    #endif
    
    // <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
    #ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
    #define NRF_SDH_BLE_CENTRAL_LINK_COUNT 8
    #endif
    
    // <o> NRF_SDH_BLE_TOTAL_LINK_COUNT - Maximum number of total concurrent connections using the default configuration. 
    #ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT
    #define NRF_SDH_BLE_TOTAL_LINK_COUNT 8
    #endif
    
Children
Related