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

when the SoftDevice Event rise SD_EVT_IRQ in Central Role? What's connect timing mode for multi-link in Central Role?

Hi:

    We are develop an Central Device can Connect 8 BLE Device in same time. and want max throughout. it use queue and freeRTOS.  the Central TX is simple.

    use  sd_ble_gattc_write() with BLE_GATT_OP_WRITE_CMD to write.  wait semaphore event rise by BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event. 

   but between the SD_EVT_IRQ interrupt rise(BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE ) and sd_ble_gattc_write, it  take about 7.5ms. not our expect 2.5ms(1Mbps) or 1.4ms(2Mbps).  When SD_EVT_IRQ interrupt rise by SoftDevice?  why it same value as NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL ? 

Is NRF_SDH_BLE_GAP_EVENT_LENGTH  use to reduce SD_EVT_IRQ  frequency?  Do the Nordic Semiconductor have guidebook for these config parameters? or have excel document can calculate these parameters?

   how the SoftDevice handle Multi-linked peripheral connect timing? 

   from "Connection timing as a Central" charter of S140_SDS_v2.1,  Do SoftDevice use one Big time Slot to scan each connected peripheral? each peripheral get equalization chance?

|  peripheral 1 connect timing(7.5ms) | peripheral 2 connect timing(7.5ms)  | .... | peripheral 8connect timing(7.5ms)|   --> Next loop

|_____________________________|_____________________________|_______________________________|

   or just each peripheral has random shift start connect timing? 

           |  peripheral 1 connect timing(7.5ms) |

                |  peripheral 2 connect timing(7.5ms) |

                 .....

                     | peripheral 8connect timing(7.5ms)| 

 

Here the Central Config:

#define NRF_SDH_BLE_GAP_DATA_LENGTH 251

#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0

#define NRF_SDH_BLE_CENTRAL_LINK_COUNT  8

#define NRF_SDH_BLE_TOTAL_LINK_COUNT    8

#define NRF_SDH_BLE_GAP_EVENT_LENGTH 6

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

#define NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL 7.5

the "Connection Event Length Extension" is enabled.  and connect peripheral use min_conn_interval=max_conn_interval=7.5ms.  peripheral use  BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE/BLE_GATT_CHAR_PROPERTIES_NOTIFY.

Parents
  • Hello,

    Thank you for your patience with this. The summer holidays have begun here in Norway, and DevZone is therefore operating with reduced staff for the time being. Sorry for any inconvenience this might cause.

    Do SoftDevice use one Big time Slot to scan each connected peripheral?

    SoftDevice scans with scan interval and window parameter to listen packets from advertisers which is not related with already connected peripherals. I suppose you might have meant each connection event when you said 'scanning each connected peripheral' - since there is no scanning of connected devices. If so, since you are already connected to 8 peripherals, the SoftDevice will already have placed timeslots for each connection event with each peer.
    each peripheral get equalization chance?

    Yes.

    how the SoftDevice handle Multi-linked peripheral connect timing? 

    For reference, In SDS v2.1 p.71, there is already an illustration of multilink scheduling with 8 connections (Figure 34). Each peripheral has its own connection interval (stated 7.5ms for each) between their connection events. Each peer's connection events are relative to the each other so their slot are placed when the connection is established and their relativity will remain same.

    just each peripheral has random shift start connect timing? 

    It is not random, they are placed relatively to each other assuming the connection intervals have a common factor see Figure 27 on page 60.

    Is NRF_SDH_BLE_GAP_EVENT_LENGTH  use to reduce SD_EVT_IRQ  frequency?  Do the Nordic Semiconductor have guidebook for these config parameters? or have excel document can calculate these parameters?

    Depending on the SD version, you can see the description and default values for these parameters;
    event length will have implicit effect on evt_IRQ frequency.

    Let's say 1MBPS used, minimum connection interval is 2.5ms and for 8 connections
    8*2.5ms=20ms for only connection events which does not fit into 7.5ms connection interval that they set.
    page 70 Figure 30 shows if there is no timeslot available in first relative connection interval. Please also know that higher priority is given to linked devices which are about to reach their timeout.

    I suggest to first increase your connection interval to a multiple of 20ms and observe bandwidth.
    If you are setting BLE_GAP_EVENT_LENGTH (multiples of 1.25ms) to 6, the suggested connection interval makes 60ms for 8 connections with each having 7.5ms event. If you want to increase their connection interval more, they can enable "Connection Event Length Extension" since this feature can increase the bandwidth by utilizing "idle" time between connection events.

    You can read more about the multilink scheduling of the SoftDevice here, particularly at the Connection timing as Central page.

    Please do not hesitate to ask if any part of this should still be unclear, or if you encounter any other issues or questions!

    Best regards,
    Karl

Reply
  • Hello,

    Thank you for your patience with this. The summer holidays have begun here in Norway, and DevZone is therefore operating with reduced staff for the time being. Sorry for any inconvenience this might cause.

    Do SoftDevice use one Big time Slot to scan each connected peripheral?

    SoftDevice scans with scan interval and window parameter to listen packets from advertisers which is not related with already connected peripherals. I suppose you might have meant each connection event when you said 'scanning each connected peripheral' - since there is no scanning of connected devices. If so, since you are already connected to 8 peripherals, the SoftDevice will already have placed timeslots for each connection event with each peer.
    each peripheral get equalization chance?

    Yes.

    how the SoftDevice handle Multi-linked peripheral connect timing? 

    For reference, In SDS v2.1 p.71, there is already an illustration of multilink scheduling with 8 connections (Figure 34). Each peripheral has its own connection interval (stated 7.5ms for each) between their connection events. Each peer's connection events are relative to the each other so their slot are placed when the connection is established and their relativity will remain same.

    just each peripheral has random shift start connect timing? 

    It is not random, they are placed relatively to each other assuming the connection intervals have a common factor see Figure 27 on page 60.

    Is NRF_SDH_BLE_GAP_EVENT_LENGTH  use to reduce SD_EVT_IRQ  frequency?  Do the Nordic Semiconductor have guidebook for these config parameters? or have excel document can calculate these parameters?

    Depending on the SD version, you can see the description and default values for these parameters;
    event length will have implicit effect on evt_IRQ frequency.

    Let's say 1MBPS used, minimum connection interval is 2.5ms and for 8 connections
    8*2.5ms=20ms for only connection events which does not fit into 7.5ms connection interval that they set.
    page 70 Figure 30 shows if there is no timeslot available in first relative connection interval. Please also know that higher priority is given to linked devices which are about to reach their timeout.

    I suggest to first increase your connection interval to a multiple of 20ms and observe bandwidth.
    If you are setting BLE_GAP_EVENT_LENGTH (multiples of 1.25ms) to 6, the suggested connection interval makes 60ms for 8 connections with each having 7.5ms event. If you want to increase their connection interval more, they can enable "Connection Event Length Extension" since this feature can increase the bandwidth by utilizing "idle" time between connection events.

    You can read more about the multilink scheduling of the SoftDevice here, particularly at the Connection timing as Central page.

    Please do not hesitate to ask if any part of this should still be unclear, or if you encounter any other issues or questions!

    Best regards,
    Karl

Children
No Data
Related