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

Transmit Large Data 518222

Hi!

I have a Nordic nrf51822-DK. I'm need send large data to the Android phone (10 mb). I'm use sample devzone.nordicsemi.com/.../dealing-large-data-packet-s-through-ble , but speed very low (one minute passed 10 kb).

BLE can transmit at speeds of up to 2Mb (www.nordicsemi.com/.../nRF51822).

How speed up data rate?

Parents
  • Hi Sergey,

    The on-air data rate for BLE is 1 MBit. However, there is overhead maintaining the protocol and processing.

    • Connection interval set to 7.5 ms
    • 6 packets (6 x 20 bytes) sent each connection interval

    If the above restrictions are accepted (your phone may not be able to receive that many packets pr interval), then your theoretical maximum transfer rate is: 1000/7.5 * 20*6 = 16kByte per second. (128 kBit)

    Note that this number is the theoretical maximum, and will be lower due to re-transmissions and may be restricted by your central (phone). The peripheral asks, but the central is the one that decides what parameters will be set.

    For speeding up the link, lower your connection interval (defines MIN_CONN_INTERVAL and MAX_CONN_INTERVAL) to minimum 7.5 ms, and use the algorithm Ole Morten posted here: devzone.nordicsemi.com/.../dealing-large-data-packet-s-through-ble

    Best regards Håkon

Reply
  • Hi Sergey,

    The on-air data rate for BLE is 1 MBit. However, there is overhead maintaining the protocol and processing.

    • Connection interval set to 7.5 ms
    • 6 packets (6 x 20 bytes) sent each connection interval

    If the above restrictions are accepted (your phone may not be able to receive that many packets pr interval), then your theoretical maximum transfer rate is: 1000/7.5 * 20*6 = 16kByte per second. (128 kBit)

    Note that this number is the theoretical maximum, and will be lower due to re-transmissions and may be restricted by your central (phone). The peripheral asks, but the central is the one that decides what parameters will be set.

    For speeding up the link, lower your connection interval (defines MIN_CONN_INTERVAL and MAX_CONN_INTERVAL) to minimum 7.5 ms, and use the algorithm Ole Morten posted here: devzone.nordicsemi.com/.../dealing-large-data-packet-s-through-ble

    Best regards Håkon

Children
  • Hi Hakon,

    I need to send large amount of data from server to client in minimum possible time.

    Can you please tell me how can I send exact 6 packets (6 calls to sd_ble_gatts_hvx) per connection interval?

    Is it something you just mentioned as an example?

    I have gone through Ole Code Snippet but have some questions:

    - what is m_rr_interval_enabled and its use?

    - When is BLE_EVT_TX_COMPLETE event raised?

    Let's say, I have an array of 1024 bytes which I want to send into 64 chunks of 16 bytes (assume characteristic has length of 16 bytes).

    Should I just call sd_ble_gatts_hvx 64 times?

    When is BLE_EVT_TX_COMPLETE event raised in that case?

    Thanks

Related