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

What are the limitations when using the S132 central with 20 peripherals connected?

Are there any limitations when the central is connected to 20 peripherals at the same time?  Is there a minimum connection interval (ie, can I set them all to 7.5ms?).

Parents
  • Hi,

    Shortest possible connection interval for n connections mainly depends on the event lengths of those connections, which is configurable in 1.25 ms units. For s132 v5 the minimum event length setting is 2.5 ms (2 units) and the default setting is 3.75 ms (3 units). (See sd_ble_cfg_set(), and the setting structure ble_cfg_t --> ble_conn_cfg_t --> ble_gap_conn_cfg_t for setting the event length.)

    How connections are scheduled is described at length in the Scheduling chapter of the SoftDevice specification. Sections "Suggested intervals and windows" and "Connection timing as a Central" should be of particular interest.

    In short, for the minimum event length of 2.5 ms the theoretical minimum connection interval is 20 * 2.5 ms = 50 ms. (Provided that there has been large enough timing windows for setting up the connections prior to that.)

    Regards
    Terje

  • Thanks, this was very helpful.

    I read through the documentation and still have some questions.  I changed the event length on the central to 2 (2.5ms).  I also see that there is a setting for min/max connection intervals in the central side.  In the multi-link example, they are set to 9.375 and 37.5ms.  That project uses a max of 8 connections.  Since my project has a max of 20, should I set these both to 50ms on the central side?  Same on the peripheral side?

    Also, let's say the system connects to only 19 peripherals and continues to scan for the 20th.  Does that scanning process interfere with the timing of the already established connections to the other 19 peripherals?  It it does, would increasing the connection interval help with this?  I would assume it would based on the documentation, but not sure how to set this up.

  • I would reduce the scan interval (and window), and/or give more headroom for scanning. The way this is scheduled is that after the first scan event the full "series" of consecutive scan events will follow regularly, back to back, fixed in the frequency given by the scan interval. Any of them colliding with active connections gets discarded. By using shorter intervals+windows more of that "free time" left after all the connection events will be utilized.

    In the end you should do some testing on a full 20 peripheral setup, in order to verify that it works as intended. Most likely you will have to do some tweaking of the settings based on the real world testing.

  • I may have found a bug in the stack.  When I increase NRF_SDH_BLE_CENTRAL_LINK_COUNT above 15, I start getting errors.  The error I am seeing is:


    implicit declaration of function 'MACRO_REPEAT_FOR_16'

    I found that the macro list stops at 15.  Is this a bug or am I doing something wrong?

  • Even after fixing all the macros, I now get an error NRF_ERROR_INTERNAL when calling nrf_sdh_ble_enable.  Has Nordic verified that 20 central connections works with the latest stack?  It's pretty easy to test by just adjusting the sdk_config in the ble central multilink example.

  • I take that back, looks like the error is actually NRF_ERROR_NO_MEM.  I still question if 20 centrals have been tested.

  • I increased the memory for the softdevice and added all the macros to get the system to build with 20 peripherals connected to a central.  It sometimes works, but usually what happens is the system connects to the 20 peripherals, but constantly tries a connection request to the same mac instead of cycling between all of them.  If I back the system down to 8 peripherals, everything seems ok.  Has anyone tried using more than 8 peripherals connected to a central?

Reply
  • I increased the memory for the softdevice and added all the macros to get the system to build with 20 peripherals connected to a central.  It sometimes works, but usually what happens is the system connects to the 20 peripherals, but constantly tries a connection request to the same mac instead of cycling between all of them.  If I back the system down to 8 peripherals, everything seems ok.  Has anyone tried using more than 8 peripherals connected to a central?

Children
  • First, thank you very much for reporting these issues!

    The SoftDevice has been thoroughly tested for 20 central links, but it seems the SDK has not. I have reported the macro issue, and will try to reproduce the other issues as well, and see if I find a solution.

    Do you by any chance have a sniffer log from a failing session, or is this something you can provide?

Related