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

ble_uart demo throughput is very slow

Hello Nordic,

I am using the BL600 third-party module and SDK 10. I was able to modify and compile project with GCC at examples\ble_peripheral\ble_app_uart\ for s110. It works nice, but the transfer speed is very low (around 500 Bytes/s). When I send a big chunk of data via UART, the module sometimes just hangs up. Definitely this example is not suitable for production. I have read all topics with descriptions about increasing the speed, but w/o success. Maybe Nordic can provide some good example for handling big amounts of data via BLE UART? Maybe with results of transfer speed for some evaluation board...

  • What kind of modifications? What kind of central device are you connecting to? The maximum throughput with S110 is 128kbps (16000B/s), but it depends on the central device. Please see this for more information.

  • Well, I use an Android phone and nRF UART App. I have connected my BL600 to serial port with 19200 bps with HW flow control, but the NUS speed is too slow to catch up with serial. I use Putty and just put some text to be sent to the phone. According to my measurements it is around 700 bytes per sec, which is really far from your theoretical limit. I tried to minimize connection interval details, but this did not help much. MIN_CONN_INTERVAL = 7.5 MAX_CONN_INTERVAL = 8 I also have tried to increase the buffer sizes UART_TX_BUF_SIZE = 1024 and UART_RX_BUF_SIZE = 1024 Transmission of 8Kb data chunk starts with jerks, then speeds up and continues with long pauses (up to 3 seconds). That's why I am asking your support team to analyze this trivial case and provide some additional example for maximum throughput and minimum delays. Thank you in advance.

    Another

  • The central device dictates the connection interval, could you check what the actual connection interval is? How is described here. Maybe you could also provide a sniffer trace? You can use nRF Sniffer. How to send large amounts of data is described here.

  • Hello. I added this lines to the event handler:

    case BLE_GAP_EVT_CONNECTED:
                err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
                APP_ERROR_CHECK(err_code);
                m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
                // Check connection interval
                printf("Max interval %d\n",  p_ble_evt->evt.gap_evt.params.connected.conn_params.max_conn_interval);
                printf("Min interval %d\n",  p_ble_evt->evt.gap_evt.params.connected.conn_params.min_conn_interval);
    

    And I got 39 for both. It gives me around 500 bytes per second. Maybe I can decrease this interval in the Android side? How should I modify nRF UART app?

    Also I have modifed sending part (APP_UART_DATA_READY event) from UART to BLE according to your advice, but this did not improve speed, but the FW stability was better.

  • Ok. It is in 1.25 ms units, so when you connect you have a connection interval of 48.75 ms. You can try to decrease the connection interval by sending a connection parameter update(CPU) request, but the central can reject it. I'm guessing that you already have included the connection parameter module, it will send a CPU request 5 seconds after connection is establised. It will send the CPU request with the MIN_CONN_INTERVAL and MAX_CONN_INTERVAL values defined in main.c Then you can check the BLE_GAP_EVT_CONN_PARAM_UPDATE event if the actual connection interval changed or not. See this MSC for more information. You can find the small connection interval by trying and failing.

Related