File transfer/large data transfer example NRF Connect sdk

Hi,

I am trying to transfer a dataset of over 100k, via a custom service from a peripheral device.

There are many posts in this forum that describe ways to do this but none seem to apply to the newer nrf Connect SDK. I am using nrf connect 1.7.1 with the VSCode extension.

The peripheral_uart example is often quoted as being a good starting point, but i can't seem to find where i would start some sort of Send data->wait for data sent event-> send next part, kind of cycle. The throughput example appears to transfer a large data set, but i am struggling to interpret that service as it is quite large. 

Is the advised way of doing this still calling notify on a characteristic? I have attempted to call Notify inside an on_sent callback but the code doesn't appear to call callbacks when already executing inside of one.

I would be very grateful if anybody could point me in the right direction towards initiating a large data transfer from a peripheral device.

Parents Reply Children
  • Thank you. 

    From my own testing, it seems you can enter a while loop, continuously adding a single byte to the send buffer, and not get a failure to add using bt_gatt_notify_cb. I think it's probably unlikely it is sending faster than the core could add to the buffer, so does this imply that this function call is blocking?

    I am more interested in how the code works and how to manipulate it than getting the highest performance at this stage.

    So why are you limiting the data size you add in your test function by the MTU size? My understanding is that MTU is a term used in the ATT layer, and the application uses Data Length? Do you have to manually chunk data this way? I thought the point of the MTU, is that is the payload size to which your Data Length will be chunked.

Related