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

Send data constantly over BLE nRF52832

Hello,

I have developed a small sensor which consists of MAX30101 HR sensor and nRF52832. For the research purpose I created an app as well which shows the raw data sent from the sensor to show the real time HR pulses. It all works fine but the only problem is that after about 7-10 seconds. The data transfer stops from the nRF52 to app.

I think the problem is that i am sending data continuously after an interval of 50ms. But the problem should not occur because my minimum connection interval is 25ms.

So what i want to know is whether there is a way to check if the data packet is successfully sent so that we can send the next packet after the first one.

Please assist me in this problem.

Thank you so much.

Parents
  • Hi,

    The relevant event is BLE_GATTS_EVT_HVN_TX_COMPLETE  that will provide the way to check if the the HV Notification data packet has been acked by the peer successfully. You can also increase the queue size for the notifications using ble_gatts_conn_cfg_t::hvn_tx_queue_size so that you are not losing data

    Additionally look at the the error code from the function to send the Notifications, you may have been silently losing data.

    You can also increase your connection interval if that fits your power envelope.

    Take a look at this case that has the events and has a similar question.

    Please upvote and accept my answer if this answer is helpful

    Thanks

Reply
  • Hi,

    The relevant event is BLE_GATTS_EVT_HVN_TX_COMPLETE  that will provide the way to check if the the HV Notification data packet has been acked by the peer successfully. You can also increase the queue size for the notifications using ble_gatts_conn_cfg_t::hvn_tx_queue_size so that you are not losing data

    Additionally look at the the error code from the function to send the Notifications, you may have been silently losing data.

    You can also increase your connection interval if that fits your power envelope.

    Take a look at this case that has the events and has a similar question.

    Please upvote and accept my answer if this answer is helpful

    Thanks

Children
No Data
Related