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

Configuring the Link Layer for DLE with s132 v4.0.2?

With s132 v3, in addition to configuring the GATT to receive larger packets like so:

ble_enable_params.gatt_enable_params.att_mtu = 247;
err_code = softdevice_enable(&ble_enable_params);

you also had to configure the link layer:

ble_opts.gap_opt.ext_len.rxtx_max_pdu_payload_size = 251;
err_code = sd_ble_opt_set(BLE_GAP_OPT_EXT_LEN, &ble_opts);

I'm now migrating to v4.0.2 and according to the migration document, the first call has been replaced with one to sd_ble_cfg_set(), but the parameter used in the second one, BLE_GAP_OPT_EXT_LEN, is just removed. It presents sd_ble_gap_data_length_update() as a replacement, but it's used during a connection, not during configuration.

So, is link layer configuration now deferred so it can be modified link-by-link?

Also, if that's true, and sd_ble_gap_data_length_update() is to be called in response to BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST, how is the event actually triggered? It seems like it would be used as a replacement of BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, but that is not made explicit.

Related