Throughput ATT_MTU

We are using nrf52832 soc for our product development and using that we are trying to increase the throughput of our device using the information from the following forum:
Novel Bits throughput guide 
In this forum it states that the Maximum GATT MTU SIZE possible is 247 bytes in which 244 bytes of data is the actual payload size and if the data is greater than the limit, then it will split into multiple packets. So we tried to send more that 247 bytes of data just to check how the data split in multiple packet is working. We tried to sent 256 bytes of data and we were able to get 255 bytes of data without any splitting, which is more than 247 bytes. So we are wondering what is the Maximum GATT MTU SIZE possible in nrf52832 soc. 
We also looked into the throughput example provided by the nordic (ble_app_att_mtu) and in that MTU size is set to 247 and data length is set to 251 which is less that what we are able to send from nrf52832 to phone, is there any possible explanation for this?

  • Hello Simonr,

    I have set 

    connection interval : 

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)

    NRF_SDH_BLE_GAP_DATA_LENGTH 251

    NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

    and my data length is 12 bytes. i.e value of temp humidity sensor

    i have taken about 2000 logs after 2 mins interval 

    it means total data i am sending is 2000*12 = 24000 bytes.

    This i am able to get in notifications:

    1st containing 244 bytes 

    2nd containing 244 bytes

    and so on 

    1). in BLE 4.2 (LE1M PHY) with no L2CAP fragments.

    i get all the data

    but when i use above combination for 

    2). BLE 5.0 (LE 2M PHY)  with no L2CAP fragments.

    i get error that connection has timeout unexpectedly when connection interval is 7.5-100ms

    and get only 2 logs of 244 bytes.

    3). BLE 5.0 (LE 2M PHY)  with  L2CAP fragments. when connection interval is 7.5-100ms

    and get all logs when NRF_SDH_BLE_GATT_MAX_MTU_SIZE 27

    3). when as i have set connection interval as 1000-1000ms 

    i am able to get data in BLE 5.0 (LE 2M PHY ) with no L2CAP fragments in Redmi Note 7

    but in ios iphone 11 i am only able to get  12 logs not the entire data

    4).Please tell me what will be my throughput if 

    i have taken about 2000 logs after 2 mins interval 

    it means total data i am sending is 2000*12 = 24000 bytes.

    This i am able to get in notifications:

    1st containing 244 bytes 

    2nd containing 244 bytes

    and so on  in BLE 4.2 (LE1M PHY) with no L2CAP fragments.

    i get all the data

  • Hi

    3. I think the reason you're only able to get some of the data on the iOS device is that iOS is somewhat restricted and I think it's only possble to transmit 184 bytes at a time, so try setting the BLE_GAP_DATA_LENGTH to 184 instead as that should let you receive all the data onto the iOS device as well. This is a choice from Apple, as it doesn't go entirely in thread with the BLE specs.

    4. So, the throughput is measured in bits, not bytes. So 24000 bytes = 8 * 24000 bits = 192 kbits. Then, 2 minutes = 120 seconds. So the throughput in that scenario would be 192 000 bits / 120 s = 1,6 kbits/s

    Best regards,

    Simon

  • Simonr u have calculted the throughput but my issue is that throughput is based on number of packets per connection interval then what will be my throughput 

    I have 

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /*

    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /*

    NRF_SDH_BLE_GAP_DATA_LENGTH 251

    NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

    i have data length 12 bytes

    taken 2000 logs after 2min interval

    8081.244 bytes BLE 5.0 LE 2M CI 7.5-100ms.pcapng

    5824.244 bytes ble 5.0 LE 2M.csv

    3771.nrf app log.txt

  • Hi

    The connection interval set in the connection (from the sniffer trace) seems to be 30ms, so I guess there will be a 30ms delay between data transfer events. It’s important to understand that multiple packets can be transferred during one connection event. Each OS/device (iOS, Android.. And their different versions etc) may have different max numbers of packets that is allowed per connection event. Smartphones also perform many tasks which means the data transfer may not occur at the calculated rate as well (the central device may be busy performing other tasks delaying the packet transfer process).

    So the calculated throughput (1.6kbits/s) will likely be close to the actual throughput, but as it is also affected by interference in the 2.4GHz spectrum, it's very hard to say what the exact throughput will be for your specific connection.

    Best regards,

    Simon

  • Hello,

    1). May i know how can we set multiple packets per connection interval?

    2). The throughput you have found pls consider ATT MTU bytes also

    3). Actually i aim to compare LE 2M and LE 1M for throughput. I made different combinations and checked using BLE 5.0 and BLE 4.2 i.e LE 2M and LE 1M resp.

    checked for both 5.0 and 4.2

    a). with 7.5-100ms CI :

    27 bytes of ATT MTU 

    158 bytes of ATT MTU 

    247 bytes of ATT MTU 

    b). 

    a). with 1000-1000ms CI :

    27 bytes of ATT MTU 

    158 bytes of ATT MTU 

    247 bytes of ATT MTU 

    Simonr ideally LE 2M is much faster than LE 1 M. Can you make some inferences from the traces i am sharing. 

    Pls help how can i do so.

    5.0_WireShark_PhoneLogs.rar

    4.2_WireShark_PhoneLogs.rar

Related