This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set BLE connection event length extension?

Hi everyone!

I'm working at ble multilink throughput, and the basic info shows as follows.

    chip: nRF52832(one central and eight peripherals)

    sdk: nRF5 SDK v17.0.2

    softdevice: s132 v7.0.1

    central example:  https://github.com/NordicPlayground/nrf52-ble-app-uart-c-multilink

    peripheral example: ble_app_uart

I konw connection event length greately affect the throughput.Now i have two questions about connection event extension.

  1. In sdk_config.h, if central and peripherals have different NRF_SDH_BLE_GAP_EVENT_LENGTH setting, what's the actual connection event length?
  2. If i want to extend connection event, do central and peripherals all need to use sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt) to enable the extension?
Parents
  • Hi, 

    1. When adjusting the define NRF_SDH_BLE_GAP_EVENT_LENGTH, you will extend the amount of data that the peripheral can send, but this might still be restricted by the central side. 

    2. Yes. You could use this conn_evt_len_ext_set function

    void conn_evt_len_ext_set(void)
    {
        ret_code_t err_code;
        ble_opt_t  opt;
    
        memset(&opt, 0x00, sizeof(opt));
        opt.common_opt.conn_evt_ext.enable = 1;
    
        err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt);
        APP_ERROR_CHECK(err_code);
    }

    and call it after ble_stack_init() in main() to enable extended BLE connection events.

    Regards,
    Amanda

  • Hi,

    1. For example, if i want to set connect event length 7.5ms, should central and peripherals all set NRF_SDH_BLE_GAP_EVENT_LENGTH 6?

    2.  If central and peripheral all need to call conn_evt_len_ext_set() to allow extend connect event length.

Reply Children
Related