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

Slave latency and interval connection for GAP advices

Dear Nordic Developer Zone,

In order to synchronize some tasks (motor-driving), I have recently implemented the radio notification interrupt.

In this interrupt, I toggle a LED on the nRF6310 board to see when the radio communication begins and stops.

During advertising, when I change the interval param, I can see the led blinking as fast I have set the interval parameter.

But, regarding the GAP interval and slave latency parameters, I can't see any difference even if I set a minimal connection interval value high : the LED continues to blink very fast when the nRF51822 chip is connected to a device (IOS app).

I have check how it is used in the "ble_app_hids_mouse" and I don't see something special to set excepted the parameters "min_conn_interval", "max_conn_interval" and "slave_latency".

Could you explain why these parameters are no effect about the frequency where the interrupt "radio notification" is called? Am I missing something?

FYI, there is no notification or data sent by the chip.

I have also read the very good answer you did here to understand the way to use these parameters : devzone.nordicsemi.com/.../what-is-connection-parameters

I am using the nRF51822 chip with softdevice and here are the values I am using :


#define SECOND_1_25_MS_UNITS 800
#define SECOND_10_MS_UNITS 100
#define MIN_CONN_INTERVAL (SECOND_1_25_MS_UNITS *5)
#define MAX_CONN_INTERVAL (SECOND_1_25_MS_UNITS *10)
#define SLAVE_LATENCY 10
#define CONN_SUP_TIMEOUT (4 * SECOND_10_MS_UNITS)                 

Thanks for your help

Parents
  • How often do you see the LED toggle currently? What could be a problem here is that the default implementation in ble_conn_params only checks the connection interval and not slave latency when checking whether current parameters are good. I belive that later versions of iOS often uses an interval of 30 ms when connecting, and if that is the case, there may never be sent an update request, since this is within your max and min. If this is the case, you should see connection events every 30 ms.

    One way to change this is to modify ble_conn_params to also check slave latency when considering parameters. This check is done in is_conn_params_ok() in ble_conn_params.c, and it should be fairly easy to extend this to also check slave latency. Doing so, you should see radio notification for every slave-latency-th connection event, if no data is pending.

    Remember that the device will wake up and send data every event if any data is queued; the slave latency is only used when no data is currently queued.

Reply
  • How often do you see the LED toggle currently? What could be a problem here is that the default implementation in ble_conn_params only checks the connection interval and not slave latency when checking whether current parameters are good. I belive that later versions of iOS often uses an interval of 30 ms when connecting, and if that is the case, there may never be sent an update request, since this is within your max and min. If this is the case, you should see connection events every 30 ms.

    One way to change this is to modify ble_conn_params to also check slave latency when considering parameters. This check is done in is_conn_params_ok() in ble_conn_params.c, and it should be fairly easy to extend this to also check slave latency. Doing so, you should see radio notification for every slave-latency-th connection event, if no data is pending.

    Remember that the device will wake up and send data every event if any data is queued; the slave latency is only used when no data is currently queued.

Children
No Data
Related