This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pc-ble-driver 1.0 bandwidth configuration

Hello,

I work on application (written in C, compiled with GCC) which use pc-ble-driver 1.0 and nRF51822QFAC with the ble_connectivity (S130 v2.0.0) as BLE Gateway. I need to to change bandwidth configuration but unfortunately I can not do this properly (or it does not work). Every time when I try to set any options using ble_conn_bw_counts_t from ble_enable_params_t struct in sd_ble_enable() I get ERROR 0x03 (NRF_ERROR_INTERNAL).

Handler sd_rpc_status_handler_t returns following codes and messages:

  • status code: '4', message: 'Error sending packet to target. Code #3'
  • status code: '4', message: 'Error sending packet to target. Code #13'

This is procedure how I try to do this:

Initialize the SoftDevice RPC module

physical_layer = sd_rpc_physical_layer_create_uart(serial_port, baud_rate, SD_RPC_FLOW_CONTROL_NONE, SD_RPC_PARITY_NONE);
...
data_link_layer = sd_rpc_data_link_layer_create_bt_three_wire(physical_layer, 1000);
...
transport_layer = sd_rpc_transport_layer_create(data_link_layer, 100);
...
adapter = sd_rpc_adapter_create(transport_layer);
...
sd_rpc_open(adapter, sd_rpc_status_handler, ble_evt_dispatch, log_handler);
...

Enable BLE Stack

ble_enable_params_t ble_enable_params;
ble_enable_params.gatts_enable_params.attr_tab_size    = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;
ble_enable_params.gatts_enable_params.service_changed  = false;
ble_enable_params.gap_enable_params.periph_conn_count  = 1;
ble_enable_params.gap_enable_params.central_conn_count = 2;
ble_enable_params.gap_enable_params.central_sec_count  = 1;
ble_enable_params.common_enable_params.vs_uuid_count   = 3;

ble_conn_bw_counts_t ble_conn_bw_counts;
ble_conn_bw_counts.tx_counts.high_count 	= 2;
ble_conn_bw_counts.tx_counts.mid_count 		= 0;
ble_conn_bw_counts.tx_counts.low_count		= 1;
ble_conn_bw_counts.rx_counts.high_count 	= 2;
ble_conn_bw_counts.rx_counts.mid_count 		= 0;
ble_conn_bw_counts.rx_counts.low_count		= 1;
ble_enable_params.common_enable_params.p_conn_bw_counts = &ble_conn_bw_counts;


err_code = sd_ble_enable(adapter, &ble_enable_params, NULL);

The result of this code is ERROR 0x03 (NRF_ERROR_INTERNAL) on sd_ble_enable(). If I remove ble_conn_bw_counts_t structure then sd_ble_enable() returns 0x00 (NRF_SUCCESS).

So could You tell me why this does not work?

Mike


EDIT 1:

Anyone? Can somebody tell me what returned to the sd_rpc_status_handler_t messages mean:

  • status code: '4', message: 'Error sending packet to target. Code #3'
  • status code: '4', message: 'Error sending packet to target. Code #13'

?

Related