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

NRF52840 BLE transfer using NUS service

image descriptionI am writing an application for sending data received over SPI from a non-nordic chip to nrf52840 to nrf uart app using NUS service. I am using 20 bytes of a packet size the max in NUS. The SPI sampling happens at 4 MHZ. I am receiving a very low throughput of around 2.88kbps. Can anyone guide me how to change BLE setting to maximize the throughput

Parents
  • Hi I followed the above thread. From which I got to know that throughput depends on connection interval and number of packets that I can send in one interval. My connection interval is as follows: #define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS) #define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS) which turns around to be 16 ms of minimum connection interval. The function I am using to push data over ble is written below ble_nus_string_send(&m_nus,buf,20); from what I have read NUS can transfer 20 bytes of data in packet. Can you give me some insight how can I use it to transfer multiple such packets in one connection time interval?

Reply
  • Hi I followed the above thread. From which I got to know that throughput depends on connection interval and number of packets that I can send in one interval. My connection interval is as follows: #define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS) #define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS) which turns around to be 16 ms of minimum connection interval. The function I am using to push data over ble is written below ble_nus_string_send(&m_nus,buf,20); from what I have read NUS can transfer 20 bytes of data in packet. Can you give me some insight how can I use it to transfer multiple such packets in one connection time interval?

Children
No Data
Related