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

Minimise time to send file over BLE

Hi Nordic support,

I'm pretty new to BLE and I have a system based on the UART example.

  • On the nRF51-DK, a modified BLE UART Peripheral example using SDK 10.0.0. It is used to received a 15kB file from an Android running nRF-UART app and write to an external memory IC over SPI.
  • On the Android phone, a modified nRF-UART app is used to transfer the file to the nRF51-DK board. The file is transferred by breaking it into 20-byte fragments as I understand that no more byte is allowed.

Observation: It takes ~10 seconds for the 15kB file to be transferred to the BLE board.

Question: Is there a method to reduced the time to transfer the mentioned file?

Any help is appreciated. Many thanks, Kevin

Parents
  • There's lots of factors involved, but the basic ones are connection interval, ie how often the two devices talk to each other and packets per connection interval, which is the number of those 20 byte packets sent in each connection.

    But instead of repeating everything - type 'throughput' into the search box ^^ up there, and you'll see loads of detailed answers to basically this question, this is probably one of the best of them

    devzone.nordicsemi.com/.../

    but read a few of them, there's lots of information there.

    So if you're only getting 1.5kB/s the most likely reason is a higher-than-optimal connection interval which you can probably deal with and possibly number of packets per connection, which may be limited by the android device. Without much difficulty you can log the connection parameters when you connect, they are given to you, and it's not very hard to figure out, with a bit more logging, how many packets are actually going out each time, or just use the wonderful sniffer and look at them.

    Also is the UART service optimal for the data you're sending? If it's full range 8-bit data, probably does as well as anything else, if you're really sending some other type of data, you may be able to send less by using something custom.

  • Thanks for your answer. I did search for the answer to this question like you suggested. Almost all of them suggest decrease the connection interval on the nRF51. Nothing much is mentioned about how to change things the Android app. That being said, is there any thing I can do on the Android side?

    Fundamentally, there is something I can do to optimise the data being used and potentially a much smaller file can be sent across. I'll experiment with this method first.

Reply
  • Thanks for your answer. I did search for the answer to this question like you suggested. Almost all of them suggest decrease the connection interval on the nRF51. Nothing much is mentioned about how to change things the Android app. That being said, is there any thing I can do on the Android side?

    Fundamentally, there is something I can do to optimise the data being used and potentially a much smaller file can be sent across. I'll experiment with this method first.

Children
No Data
Related