I am using S132 V5.1 in combination with nRF5 14.2, and I cannot find where I can set hvn_tx_queue_size.
We are using the new option to configure the softdevice using the sdk_config.h file, thus
uint32_t sd_ble_cfg_set (uint32_t cfg_id, ble_cfg_t const *p_cfg, uint32_t app_ram_base)
is never called.
Is it still possible to change the hvn_tx_queue_size when using
uint32_t nrf_sdh_ble_default_cfg_set(conn_cfg_tag, &ram_start); /* Configure the BLE stack with the settings specified in sdk_config. */
if so, how; do we still have to call sd_ble_cfg_set() somewhere, does this function play nicely with the new sdk_config.h defines?
Just do something like this:
memset(&ble_cfg, 0, sizeof ble_cfg);
ble_cfg.conn_cfg.conn_cfg_tag = conn_cfg_tag;
ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 4;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_cfg, ram_start);
After you have called nrf_sdh_ble_default_cfg_set().
Ok, looks easy enough.
However, the documentation sounds like this will override all settings from nrf_sdh_ble_default_cfg_set() which we have defined in our app_config.h.
"If a configuration is set more than once, the last one set is the one that takes effect on sd_ble_enable.
Any part of the BLE stack that is NOT configured with sd_ble_cfg_set will have default configuration."
Does this mean we shouldn't bother to use nrf_sdh_ble_default_cfg_set() in the first place? I expected that it was the new paradigm to be using.
It shouldn't override all settings. It should only override the GATTS connection configuration, since BLE_CONN_CFG_GATTS is used as configuration ID. It is up to you if you want to use nrf_sdh_ble_default_cfg_set() or not, you can set up everything manually, or you can call nrf_sdh_ble_default_cfg_set() and modify some of the configurations afterwards.
Ok, thanks for the help.
We will stick with the procedure you recommended of modifying some of the config details afterwards.
Would sd_ble_opt_set() be able to serve the same purpose in our case?
If so, I will use that since it is clearer upon reading that no other config details will be modified when calling it other than the one specified.
sd_ble_opt_set()? I'm not following.