Unable to put preferencial latency above 3 Bluetooth Low Energy HID and SMP services

Hello,

I would like to understand why I have this error when I put CONFIG_BT_PERIPHERAL_PRE_LATENCY above 3.

Note : I am developping an application using HID over GATT and SMP services on nRF Connect SDK v2.5.0

Best regards

Thibaud

Parents
  • Hi Thibaud, 


    When you see an error pointing to a line in the code, please open the code where the error is. At line 193 in gatt.c you can find this: 

    BUILD_ASSERT((CONFIG_BT_PERIPHERAL_PREF_TIMEOUT * 4U) >
             ((1U + CONFIG_BT_PERIPHERAL_PREF_LATENCY) *
              CONFIG_BT_PERIPHERAL_PREF_MAX_INT));

    So the (CONFIG_BT_PERIPHERAL_PREF_LATENCY +1 ) * CONFIG_BT_PERIPHERAL_PREF_MAX_INT should not be larger than CONFIG_BT_PERIPHERAL_PREF_TIMEOUT *4. 
    I believe this is to avoid having the connection being terminated because of too high peripheral latency. 
    (When peripheral using slave latency and at the same time if there is some interference , the connection may easily be timed out)
    You can find this at page 2811 in the Bluetooth core spec v5.4 : 

Reply
  • Hi Thibaud, 


    When you see an error pointing to a line in the code, please open the code where the error is. At line 193 in gatt.c you can find this: 

    BUILD_ASSERT((CONFIG_BT_PERIPHERAL_PREF_TIMEOUT * 4U) >
             ((1U + CONFIG_BT_PERIPHERAL_PREF_LATENCY) *
              CONFIG_BT_PERIPHERAL_PREF_MAX_INT));

    So the (CONFIG_BT_PERIPHERAL_PREF_LATENCY +1 ) * CONFIG_BT_PERIPHERAL_PREF_MAX_INT should not be larger than CONFIG_BT_PERIPHERAL_PREF_TIMEOUT *4. 
    I believe this is to avoid having the connection being terminated because of too high peripheral latency. 
    (When peripheral using slave latency and at the same time if there is some interference , the connection may easily be timed out)
    You can find this at page 2811 in the Bluetooth core spec v5.4 : 

Children
Related