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

Reduce MIN_CONN_INTERVAL on the fly ?

Hello,

I updated the "ble_app_proximity" PCA10001 example for adapting the time constants of my needs.


#define MIN_CONN_INTERVAL  MSEC_TO_UNITS(3700, UNIT_1_25_MS) 
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(4000, UNIT_1_25_MS)
#define SLAVE_LATENCY                     0                                         
#define CONN_SUP_TIMEOUT  MSEC_TO_UNITS(32000, UNIT_10_MS) 

When I press the button SIGNAL_ALERT_BUTTON the NRF51822 is good by awakening against, it shall send the alert until the next "ping" that may occur several seconds after detection.

Is there a way to force sending this information before the next "ping"? or the interval MIN_CONN_INTERVAL not be reduced by the NRF51822?

I use the IAS, and the fact wait for the next "ping" is a bit too long ...

Thank you in advance for your food for thought.

Gaétan

  • There is no way to make BLE devices exchange data at any time other than at a connection event, which occurs every connection interval. Hence, if your connection interval is 4 seconds, you can exchange data every 4 seconds, and there may be up to 4 seconds delay on every user action.

    If you need to respond to user input, you should therefore make sure to use shorter connection intervals. If current consumption is a concern, you should look into setting slave latency. Take a look at this question for details on the different connection parameters.

Related