Ble 5 send large data

Hello,

I am using nrf52840 and i am wondering which option will be the best for my project. I need to send about 5 - 10 kB data using bluetooth. Please, correct me if i am wrong.

Questions:

1) What is the maximum size of data which can i send using beacon like in the ble_app_beacon example? Is it 31 bytes or can i increase it to 251 (from bluetooth 5.x)?

If yes what should i change in example to allow bigger package send? How to queue the sending of data packages?

How to send few kilobytes of data using beacon? Or maybe there is better solution for example using connection mode?

Thanks for help!

Parents
  • Hi

    It's not possible to transmit 247 bytes "per package" with extended advertising, as the "extended" part of the advertisement will occur on secondary channels compared to the initial advertising event. But you can inded transmit 247 bytes over advertising if that's what you want. Please keep in mind though that the transmission will not be encrypted, so any BLE 5.0 scanners will be able to pick up on these transmission. So you'll get better both encryption and throughput by doing this within a connection.

    See this blog post on BLE 5.0 advertising for more information, alternatively check out the DevAcademy, that has a course on BLE fundamentals as a whole.

    Best regards,

    Simon

  • Thank you, i understand. I have last question, if i choose to send 20bytes in one advertise, which function should i use to send for example 5kB of data. Time doesn't matter here, i just want to share this data between two nrf52 development kits.

    will uint32_t ble_nus_data_send(ble_nus_t * p_nus, uint8_t * p_data, uint16_t * p_length, uint16_t conn_handle) be good at it? And how is this "queued" to send kilobytes? It's function from ble_app_uart example.

Reply
  • Thank you, i understand. I have last question, if i choose to send 20bytes in one advertise, which function should i use to send for example 5kB of data. Time doesn't matter here, i just want to share this data between two nrf52 development kits.

    will uint32_t ble_nus_data_send(ble_nus_t * p_nus, uint8_t * p_data, uint16_t * p_length, uint16_t conn_handle) be good at it? And how is this "queued" to send kilobytes? It's function from ble_app_uart example.

Children
No Data
Related