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

Missing data samples at reasonable connection intervals.

I have a test set up using the ble_app_hrs example where I increment a dummy uint16_t periodically and then send that value up to the nRF Toolbox iOS app to plot. I want to do this as fast as possible to stream debug data, ideally every 25ms, but get a repeating sample and a skipped sample periodically, even when my max connection interval is 45ms!

#define MIN_CONN_INTERVAL                    (MSEC_TO_UNITS(10, UNIT_1_25_MS))
#define MAX_CONN_INTERVAL                    (MSEC_TO_UNITS(40, UNIT_1_25_MS))

The Flow

I'm using app_timer to periodically call app_sched_event_put to execute my simple callback in the main loop/context, right now every 50ms.

static uint16_t dummy = 0;
err_code = ble_hrs_heart_rate_measurement_send(&hrs, dummy++);

I'm reading online that I should be able to connect as fast as ~18ms, but just found a failure (repeated number occasionally) with a 40ms max connection interval. Is there anything else that goes into figuring out what my minimum connection interval can be besides these constants?

  • timer interval = 50ms
  • min conn interval =10ms
  • max conn interval = 40ms
  • environmental noise?

Is there a function in code to toggle a gpio to check what my connection interval really turns out to be?

Related