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?

Parents
  • Hi

    The 27 bytes of data are the minimum data length that can be set in the BLE spec. and older devices (older than BLE v5.0) generally don't support payloads larger than 27 bytes. Can you share some information on what phone you're using.

    Again, as I tried explaining below. Your notification is indeed 252 bytes, but each data packet (L2CAP fragment) is 27 bytes. One packet and one notification is not the same, and your device sends multiple packets that the central puts together in the notification.

    Best regards,

    Simon

  • i have data length 12 bytes

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) /*

    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) /*

    case 1:

    27 bytes L2CAP.pcapng

    NRF_SDH_BLE_GAP_DATA_LENGTH 27

    NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

    i am able to get notification and able to get 244 bytes of data after reassembly by L2CAP.

    and in case 2:

    NRF_SDH_BLE_GAP_DATA_LENGTH 251

    NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

    i am using  nrf connect mobile app on  iphone 11

    251 bytes.pcapng

    i want to know that what will be beneficial in terms of throughput if i use NRF_SDH_BLE_GAP_DATA_LENGTH 27 or NRF_SDH_BLE_GAP_DATA_LENGTH 251 because in that case no L2CAP fragmentation will occur. so which is better ?

    i have to determine the throughput based on number of packets per connection interval ?

    i want to know how to get how many packets i am getting per connection interval?

  • Hi

    In regards of throughput, you can see from the maximum throughput guide you linked to, you get the highest throughput with ATT MTU set to 247 bytes, and SDH_BLE_GAP_DATA_LENGTH to 251 bytes. Throughput is decided not by packets per connection interval, but by data (bits) per second. 

    I would strongly recommend using NRF_SDH_BLE_GAP_DATA_LENGTH to 251 for the best possible throughput in your case, as well as following the sugggestions to "Optimize for maximum data throughput" in the throughput guide.

    Best regards,

    Simon

  • 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

Reply
  • 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

Children
No Data
Related