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

Stream data over nRF52 Example?

Hello, I would like to stream sensor data from the Bosch IMU sensor over BLE at a maximum rate. I can collect data over I2C from the sensor but would like to know if there is an example that I can use for a template to stream the data to an iPhone. I understand that HID type transfer mode will provide the fastest transfer rate where up to four 20 byte block transfers can occur in a single transfer interval (of 11.25 mS) achieving an effective transfer rate up to about 7KBytes per second.

Is there an example in the SDK for HID or other type of example that will get me started with a template to connect with streaming data?

I understand that using UART mode for radio transfer will not achieve very good data rates. Can it be adapted to transfer multiple 20 byte records in a single interval to improve the effective data rate?

Can the heart rate example application be used as template for achieving a high effective data rate?

Regards, GaryD

Parents
  • We do have HID examples in our SDK. It send mouse/keyboard data. But I guess in your case you want to use your own proprietary service to send data. My suggestion is to add your own service (or the UART service) to an HID project. This way you can take advantage of the low connection interval for HID device (11.25ms as you mentioned).

    To stream data, you can simply queue as much as possible notification until the buffer on the nRF5 full, and then wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event to start queuing again.

Reply
  • We do have HID examples in our SDK. It send mouse/keyboard data. But I guess in your case you want to use your own proprietary service to send data. My suggestion is to add your own service (or the UART service) to an HID project. This way you can take advantage of the low connection interval for HID device (11.25ms as you mentioned).

    To stream data, you can simply queue as much as possible notification until the buffer on the nRF5 full, and then wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event to start queuing again.

Children
No Data
Related