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

Throughput on nRF51 S110 to S120

Hi,

I'm using the example projects "ble_peripheral/ble_app_uart" "ble_central/ble_app_uart_c" in SDK10.0.0 to test data throughput.

I'm sending 20bytes of payload. But I'm only able to send about 13 packets/s when sending from S110 peripheral to S120 central.

But i get about 130 packets/s when i'm sending from the S110 peripheral to my Android phone.

I have set MIN_CONN_INTERVAL to 7.5ms on both peripheral and central. I'm not handling any UART input data or sending out any data from the UART.

What could be causing the S120 central to slow the link down by 10x compared to the Android phone?

I have attached packet sniffer log from the two scenarios:

  1. Link from S110 peripheral to S120 central: nrf51_s110_to_s120_speed_test.pcapng

  2. Link from S110 peripheral to android phone: nrf51_s110_to_android_speed_test.pcapng

I'm sending packets from the S110 peripheral using this code in main:

for (;;)
{
    while(clear_to_send)
    {            
        err_code = ble_nus_string_send(&m_nus, testdata, 20);            
    
        if(err_code == BLE_ERROR_NO_TX_BUFFERS)
        {
            clear_to_send = false;
        } else {
            testdata[0] = (cnt++&0x3)+'0';
        }
    
    }
    power_manage();
}

Clear to send setting: (From devzone.nordicsemi.com/.../)

static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
{
    ble_conn_params_on_ble_evt(p_ble_evt);
    ble_nus_on_ble_evt(&m_nus, p_ble_evt);
    on_ble_evt(p_ble_evt);
    ble_advertising_on_ble_evt(p_ble_evt);
    bsp_btn_ble_on_ble_evt(p_ble_evt);

    if(p_ble_evt->header.evt_id == BLE_EVT_TX_COMPLETE || p_ble_evt->header.evt_id == BLE_GAP_EVT_CONNECTED)
    {
        clear_to_send = true;
    }

}

nRF51 SDK 10.0.0

S110 8.0.0

S120 2.1.0

Parents
  • According to pcap files you provided, when doing connection between s110 and s120 Your connection interval sets to 75ms (not 7.5). When connecting with android, connection interval is 48.75ms. Try setting both MIN and MAX connection interval on your s110 to 7.5ms so You will have it for sure.

    Also, s120 does not support receiving multiple packets per one connection interval - many android phones do support it (ex. my galaxy S4 does about 3 or 4 packets per connection interval), so throughput is much better.

    This thread might be helpful.

Reply
  • According to pcap files you provided, when doing connection between s110 and s120 Your connection interval sets to 75ms (not 7.5). When connecting with android, connection interval is 48.75ms. Try setting both MIN and MAX connection interval on your s110 to 7.5ms so You will have it for sure.

    Also, s120 does not support receiving multiple packets per one connection interval - many android phones do support it (ex. my galaxy S4 does about 3 or 4 packets per connection interval), so throughput is much better.

    This thread might be helpful.

Children
Related