re-assembling large notification data #ble #bluetooth


alok.sethi1+zephyr@...
 

Hello,

I am fairly new to bluetooth n BLE and would need advice about how to transfer large amount of data (data larger than the MTU) from a sensor to a central device.
So the sensor is using notifications to send the data in multiple chunks and on the central device, my notification callback is called multiple times with a data pointer and length.

I believe that the notifications are acknowledged at the link layer so the application does not get any marker that there is more data pending. is that true?
Further, are the notifications guaranteed to be delivered in sequence?

Currently the sensor is putting a header on only the first chunk and not on the rest of chunks. I can run a re-assembly timer and just assemble the data from different notification calls, provided that the fragments are guaranteed to be delivered in sequence.
Below is just a snapshot of logs taken from the notification callback handler, showing the length of the fragment and the MTU of the connection.

[00:57:40.765,045] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.765,716] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.766,357] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.766,815] <dbg> ble_hdlr: notify_func: notify len:2, mtu:65


BR

Join users@lists.zephyrproject.org to automatically receive all group messages.