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

Bandwidth Configuration: how to achieve different bandwidths

Hi

I'm trying to get higher throughput when connected as a central by increasing my Tx&Rx bandwidth to high (from the default medium).

uint32_t nrfErr; ble_opt_t opt = {0};

/* Set the role as central */
opt.common_opt.conn_bw.role = 2;
/* Set the transmit bandwidth to be high */
opt.common_opt.conn_bw.conn_bw.conn_bw_tx = 3;
/* Set the receive bandwidth to be high */
opt.common_opt.conn_bw.conn_bw.conn_bw_rx = 3;

nrfErr = sd_ble_opt_set(BLE_COMMON_OPT_CONN_BW, &opt);

I've left the bandwidth configuration to NULL when enabling the softdevice as follows:-

ble_enable_params_t enable_params;

enable_params.common_enable_params.p_conn_bw_counts = NULL;

However, with the above configuration I did not see any change in throughput and it seems that the bandwidth has not been effectively changed. Should the p_conn_bw_counts be changed to value other than NULL? and if that's the case what's the value that can get us the maximum throughput as a central?

We're using an nrf52 with softdevice 132 v3.0.0

Thanks

  • If you set enable_params.common_enable_params.p_conn_bw_counts to NULL you tell the SoftDevice to reserve RAM for default bandwidth configuration for your connections. Connections as a Central will be set to medium bandwidth and connections as a Peripheral will be set to high bandwidth. See this for more information.

    So if you want to use BLE_CONN_BW_HIGH with a connection as a central you need to set enable_params.common_enable_params.p_conn_bw_counts something that reflects this.

Related