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

Sending audio file through BLE

Hey,

I would like to send an audio file (Mp3 format) of 4 MB between nrf52 DK and mobile. How can I able to transfer such big data through BLE, I would like know how data transfers by small packets. 

Regards

Sumanth 

  • Hi

    The most efficient way to transfer large amounts of data is to split your file in smaller packets, and scale the packets after the data length that you negotiate after establishing the BLE connection.

    In the best case you get 244 bytes of application data in each payload, but when communicating with a smart phone it varies by phone how much you can actually get. 

    The BLE stack will ensure data integrity and reliability for you, to make sure that the packets are received in the order they are sent, and free of bit errors. 

    How to split the data into packets depends on where you are getting the data from. Assuming the data is stored in an internal RAM buffer it should be quite easy to send parts of the RAM buffer, update the pointer by the required amount, and send another packet with the next part of the buffer. 

    Best regards
    Torbjørn

Related