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

UART Service data length

Hi , 

I have a large data structure that I'd like to transfer ( few KB ) , what is the maximum length I can pass on "ble_nus_string_send" ? ( length appear as uint_16 ) 

Do I have to break down the data into 20 Bytes and put it back together on the other end ? ( or will ble_nus_string_send take care of this ? ) 

Thanks, 

Ran 

Parents
  • Do I have to break down the data into 20 Bytes and put it back together on the other end ?

    Not necessarily, and yes.  Not 20 bytes necessarily: You can break it down to 247 byte packets if all of your devices support large MTU negotiation. Google NRF_SDH_BLE_GATT_MAX_MTU_SIZE for ex.  Yes, you are going to want to put it back together at the other end and do all of the usual things to discover data loss, recover from link breakage, and such.

Reply
  • Do I have to break down the data into 20 Bytes and put it back together on the other end ?

    Not necessarily, and yes.  Not 20 bytes necessarily: You can break it down to 247 byte packets if all of your devices support large MTU negotiation. Google NRF_SDH_BLE_GATT_MAX_MTU_SIZE for ex.  Yes, you are going to want to put it back together at the other end and do all of the usual things to discover data loss, recover from link breakage, and such.

Children
Related