Query regarding File Transfer using BLE USB Dongle

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

This is regarding file transfer between BLE USB dongle and Connected BLE peer device.

   

My requirement is that I need to breakdown a file in small packets and send packets to the peer device.

   

Peer device will send me acknowledgement after receiving a packet. if response is Pass i need to continue with further packets else stop the transfer and inform the user about error.

   

I'm preparing to reuse the Notification Logger example for my requirement. This is available online as api_examples .

   

As in this example Connection to peer device is already set.

   

I need to work on the mechanism of send packet and receiving acknowledgement part. I'm planning to use like below

   

use instance of ICyL2CapMgr interface to send and receive the data. Kindly let me know if the approach is correct.

   

If the approach is not correct kindly suggest alternative method the fulfill my requirements.

   

regards

   

-Sandeep

0 Likes
2 Replies
Anonymous
Not applicable

A regular characteristic write operation will send back an ACK when completed successfully, and can time out upon failure; Then you just do some simple math to keep track of which packet/data was sent/lost when the events occur. Here is the function name: CyBle_GattcWriteCharacteristicValue()

   

Notifications will work, but since they are inherently asynchronous and unconnected to any other packets, you will end up implementing code just to keep track of the ACK/NACK functionality of the communications.

   

Plus, the word "write" fits writing a file to a server more aptly in name I think. 🙂

0 Likes
Anonymous
Not applicable

thanks for the info.

0 Likes