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

nRF 52 Throughput with different phones

Hello,

I'm using BT840XE module and ATT_MTU Throughput Example with S140. My goal is to measure maximum data transfer speed between module and different phones. Module acts as peripheral and phone as master. For phones, I use nRF Connect app. 

Problem is that i get different data transfer speed with different phones. I measure how many data packets are send per connection interval. Every time BLE_GATTS_EVT_HVN_TX_COMPLETE arrives GPIO pin is toggled. And i see that some phones accept more packets per connection interval than others. Please see attached pictures. Samsung J7 accepts only 5 packets per connection interval and Google pixel a3 accepts packets in whole connection interval.

Settings:

Connection interval: 100ms

NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

NRF_SDH_BLE_GAP_EVENT_LENGTH 300

My question is what could cause that huge differences in delivering data packets to phone? Maybe phones has some kind of limitation?

Best regards,

Rytis

  • Hello,

    as suggested using ble_app_att_mtu_throughput example with Iphone 7 i managed to get only ~350000 b/s rate. This is only half theoretical 4.2 1M ble speed. I used 15ms connection interval, enabled DLE and Event Length extension.

    Could it be that iOS devices limits BLE speed?

    Also nRF board sends only 3 packets per connection interval to Iphone 7, and i think this is reason why throughput to iPhone 7 is not as big as could be theoretically.

    If phone has Bluetooth 4.2 doesn't what mean that maximum BLE 1M throughput(~700000b/s) should be reachable?

  • Rytis said:
    Could it be that iOS devices limits BLE speed?

     Indeed it does. But that is understandable. The phone doesn't want to use the radio 100% for Bluetooth. It has a lot of other things to handle as well. The theoretical limit when you use 1Mbps is roughly 750kbps. 

    In order to get higher throughput, you must increase the connection interval, and on phones this is not up to the application to decide. You can try to change to 2MBPS (if supported). That will increase the throughput, but other than that, the speed you are seeing now is probably the most you will get out of a BLE link with that phone.

     

    Rytis said:
    If phone has Bluetooth 4.2 doesn't what mean that maximum BLE 1M throughput(~700000b/s) should be reachable?

     A phone doesn't give you 700kbps even though it has Bluetooth 4.2. Only if both devices (central and peripheral) can agree on connection parameters that will maximize the throughput it will give you closer to the theoretical maximum. 

    I think a connection interval of 50ms would be more ideal in your case, but I don't think Apple supports that. 

  • I did some tests and best throughput results are with 15ms connection interval. nRF receives 3 BLE_GATTS_EVT_HVN_TX_COMPLETE events in one connection interval. As i understand that means 3 notification packets are sent in connection interval?

    If connection interval is bigger than 15ms same 3 BLE_GATTS_EVT_HVN_TX_COMPLETE  events occurs. So increasing connection interval doesn't help in this case.

  • What example are you working from?

    What is your NRF_SDH_BLE_GATT_MAX_MTU_SIZE?

    What is the length of the notifications you are sending?

    When gatt_evt_handler() is called, what is the p_evt->params.att_mtu_effective - OPCODE_LENGTH - HANDLE_LENGTH? It should be printed in the log:

    m_ble_nus_max_data_len = p_evt->params.att_mtu_effective - OPCODE_LENGTH - HANDLE_LENGTH;
            NRF_LOG_INFO("Data len is set to 0x%X(%d)", m_ble_nus_max_data_len, m_ble_nus_max_data_len);

  • 1. I'm working with ATT_MTU Throughput Example.

    2. NRF_SDH_BLE_GATT_MAX_MTU_SIZE  247

    3. I'm sending 244 length uint8_t array

    4. p_ctx->max_payload_len =
                p_gatt_evt->params.att_mtu_effective - OPCODE_LENGTH - HANDLE_LENGTH;

    after that line max_payload_len set to 244.

Related