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

NRF52840 reducing minimum connection event length

Hi all,

In my current project I have 7 sensors, each hooked up to an own nrf52. I am polling between 8 and 28 byte(depending on operation mode) of data in 10ms intervals. Currently, I have 6 of them set up as peripherals and one of them as their Master.

The idea is as follows: The peripherals notify the Master with a connection interval of 10ms, after the arrival of each packet, the Master concats everything to a larger packet of 56 to 196byte and notifies another Master, which in this case is a BLED112 dongle.

I did my fair share of reading on this topic and know, that the minimum connection event length of 2.5ms is my bottleneck. Due to this I won't be able to work with my desired connection interval of 10ms, but rather an easily calculated interval of 6*2.5ms(receiving) + (>)2.5ms(transmitting)  = 17.5ms, which is probably not possible due to the transmitting event being longer than 2.5ms. 

Is it possible to reduce the connection event length below this 2.5ms? At least for the case I only want to transmit 8 byte?

In addition to this, if I would resign from the idea of using connections and instead advertise the sensor data periodically, would I be able to scan and receive the data faster than every 2.5ms?

Thanks in advance!

Parents
  • Hi,

    Is it possible to reduce the connection event length below this 2.5ms? At least for the case I only want to transmit 8 byte?

    Not possible with S140, but with SoftDevice variant S122(central-only SoftDevice ), you have the possibility to use 1.25ms event length for 2Mbps PHY.

    /**@defgroup BLE_GAP_EVENT_LENGTH GAP event length defines.
     *
     * If the link is configured with an event length above the minimum,
     * the SoftDevice will guarantee the link will not be allocated more time than specified.
     * If the configured event length is too short for the current PHY, more time will be allocated to be able to transmit at least one packet pair.
     * Notice that this may lead to scheduling conflicts. See the SoftDevice Specification for more details.
     * @{ */
    #define BLE_GAP_EVENT_LENGTH_MIN            (2)  /**< Minimum event length, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_1MBPS_PHY_MIN  (2)  /**< Minimum event length on 1 Mbps PHY, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_2MBPS_PHY_MIN  (1)  /**< Minimum event length on 2 Mbps PHY, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_DEFAULT        (3)  /**< Default event length, in 1.25 ms units. */
    /**@} */

    But since S122 is central only, you wont be able to transmit this data to another central device, and S122 supports nRF52811, nRF52820 and nRF52833. i.e. not nRF52840. Depending on what timeline you have and what resources you have available for this project, you could alternatively skip the BLED112, and create e.g. a nRF52833 dongle instead.

    Yes, advertising the data instead is an alternative, but note that minimum advertising interval is 20 ms (Set by the Bleutooth spec), and that with advertising you are not guaranteed that the scanner will be able to scan all the packets that are sent.

Reply
  • Hi,

    Is it possible to reduce the connection event length below this 2.5ms? At least for the case I only want to transmit 8 byte?

    Not possible with S140, but with SoftDevice variant S122(central-only SoftDevice ), you have the possibility to use 1.25ms event length for 2Mbps PHY.

    /**@defgroup BLE_GAP_EVENT_LENGTH GAP event length defines.
     *
     * If the link is configured with an event length above the minimum,
     * the SoftDevice will guarantee the link will not be allocated more time than specified.
     * If the configured event length is too short for the current PHY, more time will be allocated to be able to transmit at least one packet pair.
     * Notice that this may lead to scheduling conflicts. See the SoftDevice Specification for more details.
     * @{ */
    #define BLE_GAP_EVENT_LENGTH_MIN            (2)  /**< Minimum event length, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_1MBPS_PHY_MIN  (2)  /**< Minimum event length on 1 Mbps PHY, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_2MBPS_PHY_MIN  (1)  /**< Minimum event length on 2 Mbps PHY, in 1.25 ms units. */
    #define BLE_GAP_EVENT_LENGTH_DEFAULT        (3)  /**< Default event length, in 1.25 ms units. */
    /**@} */

    But since S122 is central only, you wont be able to transmit this data to another central device, and S122 supports nRF52811, nRF52820 and nRF52833. i.e. not nRF52840. Depending on what timeline you have and what resources you have available for this project, you could alternatively skip the BLED112, and create e.g. a nRF52833 dongle instead.

    Yes, advertising the data instead is an alternative, but note that minimum advertising interval is 20 ms (Set by the Bleutooth spec), and that with advertising you are not guaranteed that the scanner will be able to scan all the packets that are sent.

Children
No Data
Related