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

SDK15 How to set scan data?

Hi,

I have migrated from SDK14.1 to SDK15.

One thing is embarrassing me.

static test_params_t m_test_params =
{
    .att_mtu                  = NRF_SDH_BLE_GATT_MAX_MTU_SIZE,
    .conn_interval            = CONN_INTERVAL_DEFAULT,
    .data_len_ext_enabled     = true,
    .conn_evt_len_ext_enabled = true,
    // Only symmetric PHYs are supported.
#if defined(S140)
    .phys.tx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
    .phys.rx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
#else
    .phys.tx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS,
    .phys.rx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS,
#endif
};

gatt_mtu_set(m_test_params.att_mtu);
data_len_ext_set(m_test_params.data_len_ext_enabled);
conn_evt_len_ext_set(m_test_params.conn_evt_len_ext_enabled);
preferred_phy_set(&m_test_params.phys);

I would like to modify the scan data as above,
I do not know where I can fix it.

phy can be modified in the m_scan_params variable,
I know that the MTU Size can be modified in the gatt_init () function.

Where can I modify data_len_ext_enabled and conn_evt_len_ext_enabled? Help me.

Parents
  • Hello,

     

    Event length extension is set within the function nrf_sdh_ble_default_cfg_set(); which is typically called from main.c, and is defined in nrf_sdh_ble.c.

    It uses the define NRF_SDH_BLE_GAP_EVENT_LENGTH from sdk_config.h, so that (sdk_config.h) is where you should modify your event length.

     

    To update the data length extension, see the function sd_ble_gap_data_length_update(). It is also used in many of the examples. Documentation for the function is found on infocenter.

     

    Best regards,

    Edvin

Reply
  • Hello,

     

    Event length extension is set within the function nrf_sdh_ble_default_cfg_set(); which is typically called from main.c, and is defined in nrf_sdh_ble.c.

    It uses the define NRF_SDH_BLE_GAP_EVENT_LENGTH from sdk_config.h, so that (sdk_config.h) is where you should modify your event length.

     

    To update the data length extension, see the function sd_ble_gap_data_length_update(). It is also used in many of the examples. Documentation for the function is found on infocenter.

     

    Best regards,

    Edvin

Children
No Data
Related