Hello!
I went through the example project "Experimental: ATT_MTU Throughput Example" provided in SDK v15.2.0 and found that there is a configuration bit in BLE_COMMON_OPTS that allows to enable / disable the Data Length Extension (DLE) for BLE 4.2 and higher.
The bit, called "conn_evt_len_ext_enabled" is part of the structure defined with type "ble_common_opt_t"
In the example, this bit can be modified in function conn_evt_len_ext_set() (in file main.c)
My questions are:
1. is this bit enabled by default in the SoftDevice s140 of SDK v15.0.0 and v15.2.0 or must it be enabled programmatically?
(i.e. is DLE enabled and available, so that changes in NRF_SDH_BLE_GAP_DATA_LENGTH can become effective?)
2. I have written a simple function to check the status of this bit:
bool conn_evt_len_ext_get(void) { ret_code_t err_code; ble_opt_t opt2; // read back BLE option settings: memset(&opt2, 0x00, sizeof(opt2)); err_code = sd_ble_opt_get(BLE_COMMON_OPT_CONN_EVT_EXT, &opt2); APP_ERROR_CHECK(err_code); if(opt2.common_opt.conn_evt_ext.enable != 0) { return true; } else { return false; } }
When calling this function at the end of all initializations, I get a runtime error:
<error> app: ERROR 6 [NRF_ERROR_NOT_SUPPORTED]
What could be the reason of this error?
(NOTE that my application is a BLE peripheral and the mentioned code in the SDK is a "Central & Peripheral" example)
Thanks for any suggestions.