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

pc-ble-driver 1.0 - maximum data throughput

Hello,

I try to achieve maximum data throughput using pc-ble-driver 1.0 and nRF51(with ble_connectivity) as BLE dongle.

First problem I encountered was the bug with setting ble_conn_bw_counts_t parameters in the sd_ble_enable() but thanks to Hung Bui it was resolved here.

Unfortunately, it is still not possible to achieve maximum data throughput (128 kbit/s). I am able to achieve only around 16,8 kbit/s - not enough for me. Of course I set minimum avaliable connection interval (7.5ms) and high bandwidth with sd_ble_opt_set(). For tests I use nRF51 device as peripheral which sends data in infinite loop and prints count of successfully sent bits. The test device seems to be working properly because it has no problem to achieve maximum data throughput with the Master Control Panel 3.10.

Here is some code:

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  = 0;
ble_enable_params.gap_enable_params.central_conn_count = 1;
ble_enable_params.gap_enable_params.central_sec_count  = 0;
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     = 1;
ble_conn_bw_counts.tx_counts.mid_count      = 0;
ble_conn_bw_counts.tx_counts.low_count      = 0;
ble_conn_bw_counts.rx_counts.high_count     = 1;
ble_conn_bw_counts.rx_counts.mid_count      = 0;
ble_conn_bw_counts.rx_counts.low_count      = 0;
ble_enable_params.common_enable_params.p_conn_bw_counts = &ble_conn_bw_counts;


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

_

ble_opt_t ble_opt;
ble_opt.common_opt.conn_bw.role = BLE_GAP_ROLE_CENTRAL;
ble_opt.common_opt.conn_bw.conn_bw.conn_bw_rx = BLE_CONN_BW_HIGH;
ble_opt.common_opt.conn_bw.conn_bw.conn_bw_tx = BLE_CONN_BW_HIGH;

uint32_t err_code = sd_ble_opt_set(adapter, BLE_COMMON_OPT_CONN_BW, &ble_opt);
...

I noticed that my peripheral device in not able to send me 6 packet per every connection interval. Sometimes it sends only 3 or 1 packet.

Could you tell me if it is possible to achieve maximum data throughput with ble_connectivity and pc-ble-driver? If yes, what I have to do?

EDIT: I've attached log form nRF Sniffer: SNIFF_LOG

  • Hi Mike,

    I spoke to one of the pc-ble-driver developers and it appears that you have reached the throughput( ~16kbit/s) possible using the nRF5x DKs and dongles.

    This is due to delays introduced by passing all the data through the Segger chip and that there are handshakes which further restricts the max communication speed.

    Best regards

    Bjørn

  • Hi Bjørn,

    thank you for the answer but I do not use a development kit. My central device is the nRF51 chip connected directly to a second processor via UART.

    I do not think that the Segger chip is a bottleneck because I've also made some tests with the same peripheral device and Master Control Panel with PCA10000 (which has a Segger chip) as a central. There was no problem with data throughput...

    Best regards

    Mike

    EDIT: Maybe the UART speed is a problem. I use default 115200 baudrate... I will try to investigate it.

  • Hi,
    there are a couple of reasons why Master Control Panel runs faster than pc-ble-driver

    1. MCP uses 1Mbps baud rate, pc-ble-driver connectivity hex is set to 115200
    2. pc-ble-driver uses a software handshaking protocol over UART meaning it's a lot more afflicted by the latency added by JLink, MCP uses no handshaking
  • Hi again,

    I tried to check it with higher UART baud rates but I it doesn't work with bauds higher than 115200. I always get NRF_ERROR_INTERNAL on sd_ble_enable... With baud 115200 works fine... Have you tested the nRF51 as ble_connectivity chip with bauds higher then 115200? Is there any limitation?

    Edit:

    I've also made tests with the nRF52 and there is no problem with baud 1Mbps (using this baud rate I am able to achieve around 90kbps throughput), so it seems to be problem specified to the nRF51. What it could be?

    Unfortunately, I can not use nRF52 instead of nRF51 in my project...

  • Hi, both nRF51 and nRF52 have been tested with 1Mbps. There are no provided connectivity firmware for 1Mbps so you have to modify the baud rate in connectivity project and recompile it.

Related