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 : 

  • Hi 


    Thank you for your answer, indeed I should have opened the code.

    On an other hand, I can't connect to windows 7 & windows 11 PC in bluetooth, with the SoftDevice Controller, is that a know issue of the controller ? 

    When I try to connect to the Windows 11 PC I have a LOG disconnected reason 8, do you think mdify the preferred supervision timeout or the min or max connection interval could help resolve the issue ?

    Best regards

    Thibaud

  • Hi Thibaud, 

    Disconnection reason 8 means connection timed out. 
    Please try to disable peripheral latency and test again. Also please try to increase the connection timeout. 


    If the connection was caused by interference and packet drop the peripheral latency will increase the chance of connection timeout. 
    Could you try to sniff the connection by using a sniffer ? We have a guide on how to use it here.

    As far as I know we don't have any issue with connecting to Windows machine. 

  • Hello

    Since I posted the message I added this to my prj.conf : 

    And it is working on both PC, but on the windows 7 it says driver HID BT OK but no bluetooth driver found for this device. Can you suggest a driver for bluetooth on windows 7? Note that, I don't have the warning with a device using HID over bluetooth on nRF5.

  • Hi, 

    Please take a screenshot when you see the problem. 
    Have you tested with the HID sample in nRF Connect SDK ? (mouse/keyboard). 
    Usually you don't need a driver for HID device. 

Reply Children
Related