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

How can I connect two nRF52840 to transfer large data files?

Hello, Would you have application that can support two nRF52840 pairing and transfer arbitrary large data files?

Thanks, Gerry

Parents
  • Hi Gerry

    There is a throughput example in the SDK that can be used as a starting point if you want to maximize the throughput over BLE: \nRF5_SDK_13.0.0\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput\

    The example shows how you can enable important features such as data length extension, connection event extension, and how you can increase the GATT MTU size.

    Out of the box it is only set up to send dummy data, so it will need some modifications to send an actual file.

    Best regards
    Torbjørn

Reply
  • Hi Gerry

    There is a throughput example in the SDK that can be used as a starting point if you want to maximize the throughput over BLE: \nRF5_SDK_13.0.0\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput\

    The example shows how you can enable important features such as data length extension, connection event extension, and how you can increase the GATT MTU size.

    Out of the box it is only set up to send dummy data, so it will need some modifications to send an actual file.

    Best regards
    Torbjørn

Children
  • The packet transmission is handled by the function called char_notification_send(..) on line 218 of amts.c
    Right now it is only sending a static buffer called uint8_t data[256] over and over, but you can replace this variable with some data of your own. The "file" size is set by the AMT_BYTE_TRANSFER_CNT define, which you can also change if you want to change the transfer size.

    The transmission of dummy data is initiated by the nrf_ble_amts_notif_spam(&m_amts) function. You should probably add a similar function that allows you to pass some data to the amts.c module, rather than just sending dummy data, and have the char_notification_send(..) function break your data into pieces and send them one after the other.

Related