Enable to pair between my computer on windows and my board runing the ble sample peripheral_hids_keyboard

Hi

I am using the sample peripheral_hids_keyboard on nRFconnect with toolchain and SDK @ V2.3.0

Using the sample, I've been able to connect and bound with this smartphone : 

I've also been able to bound with an iPhone 11 pro on ios16, after modifing this macro : OUTPUT_REP_KEYS_REF_ID from 1 to 2 (so it is not the same ID as INPUT report)

But I can't connect with a portable computer, I've tried with one on Windows 10 and one on Windows 11. 

Here the log when I try to connect with the PC on Windows 11 : 

As you can see, I've tried to connect 2 times but it failed both. 

I've also can't connect with an Android 13.

Best regards,

Thibaud

Parents
  • Hello,

    I did a quick test on ncs v2.5.0, where the only modification I did was to disable NFC_OOB_PAIRING in kconfig

    It seems to work with both my iPhone 15 pro and my Windows desktop. Though make sure to press button 1 to bond, ref:

    Kenneth 

  • hello,

    As I was saying last time I have problem using ble samples. I can't bound to any windows (10&11) computers and had issues with an android smartphone too. 

    In my open space we have 5 computers, 4 on Windows 10 and 1 on Windows 11. On all that computers I can bound with only one and it was difficult, I had to try to connect around 5 or 6 times before it asks me the sequence with the passkey, every other times it ended up in "Try to reconnect your device".

    Using the zephyr bluetooth LE controller instead of the SoftDevice Controller resolved my problems. 

    The thing is, I would prefer to use the SoftDevice Controller since Nordic designed it for nFR series and I think it would be simplier if I need support in the future. 

    So, I've setup your sniffer with wireshark and here is my LOGs : 

    Radio_frame_windows_10 : 

    LOG from the board : 

    Radio_frame_windows_11 : 

    Log from the board : 

    Wireshark file from windows 11 bounding try :   windows_11_frame.pcapng

    Seems I have been able to work with the zephyr controller I mooved on and satrted developping my application, but I had an other issue . Seems my peripheral doesn't have IO or Display I need a Just Works pairing with the central. To do that I deleted the lines : 

    But I had to disable the options  CONFIG_BT_SETTINGS and CONFIG_SETTINGS too so it works.

    If I use those options I can't connect to any central in Just Works, I have to enable the passkey pairing which I don't want.

    I have the problem with both Zephyr and Nordic Controler.

    Do you have ever heard of this problem ?This is kind of a big deal seems i need those options to reconnect to a central after a reset.

    I am using SDK v2.3.0 since v2.5.0 does not solve any of my issues.

    Best regards

    Thibaud

  • Hi

    I need secure connection for HID keyboard on iPhone.

    I also spend a lot of time on the devzone searching for someone with the same problem and I didn't find anyone.
    Which I do not understand because I tried to flash the sample from a couple of computer and with all recent sdk versions and everytime it ended up the same. I can't connect to Windows PC. We have 5 PC in the room, every one on windows and  I can connect to only one, after a lot of try.

    I tried to flash the sample with the programmer in nRF Connect for Desktop and same issue.

    This issue is annoying me a lot, I saw on the devzone that Nordic does not certify Zephyr Controller on nRF series and my product need to be certify.

    Do you know anything about disconnection for reason 8. I know it is BLE_HCI_CONNECTION_TIMEOUT  but I do not change anything in this part so it should not be a problem isn't it ?

    At this moment the LOGs when I try to connect to my PC  are : 

    Sometimes it is reason 19 (0x13) as I send at the begining of this case, and sometimes it is 8.

    Regards

    THibaud

  • Hello,

    8 means connection timeout, this can happen when there is much noise in the system, but also if there is a problem with the tolerance of lfclk.

    19 means remote user terminated connection, could be several reasons for that, but given your problems possible for instance that the peer (e.g Windows) already had an active bond with the device in question, and when it detected that the keys did not match it disconnected. Typically removing the device from the Bluetooth list in Windows will solve that.

    Kenneth

  • Hello

    19 means remote user terminated connection, could be several reasons for that, but given your problems possible for instance that the peer (e.g Windows) already had an active bond with the device in question, and when it detected that the keys did not match it disconnected. Typically removing the device from the Bluetooth list in Windows will solve that.

    It appened even with the device removed from my Bluetooth list.

    8 means connection timeout, this can happen when there is much noise in the system, but also if there is a problem with the tolerance of lfclk.

    Where can I look at to solve this problem ?

    Thibaud

  • The default with the DK should be 50ppm, but you can try to set it to (worst case) 500ppm by: 
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_CLOCK_CONTROL_NRF_ACCURACY_PPM 

    Kenneth

  • Which clock source would you recommend me to use ?

    It seems logical for me to use the Crystal Oscillator especially since it is an evaluation board.

    Thibaud

Reply Children
  • The 500ppm should work with both RC and XTAL, but if you go 250 and below you need to have a XTAL yes.

    Kenneth

  • Hi Kenneth,

    Today the sample peripheral_hids_keyboard was miraculously working on the windows 10 PCs of my coworkers, so I I mooved on. I've took back the Zephyr stack even if it is still not working on my windows 11, but it is not my priority for now. 


    Since the sample had a better compatibility with PCs on SDK v2.5.0 I've mooved on to this version.

    I've made an application from the sample and the only big difference is I use Just Works pairing instead of the pairing with a passkey.

    But I have an issue when I try to connect to smartphones which I've already had a bound way before.

    When I enable the BT_SETTINGS I have this error in the LOGs : 

    Which became those warning when I enable CONFIG_BT_KEYS_OVERWRITE_OLDEST : 

    As before, increasing the number of  CONFIG_BT_MAX_CONN & CONFIG_BT_MAX_PAIRED makes the error disappears but, I still can't bound to the smartphones in this list.

    Update : after erasing the flash and re falshing the application everything is working fine. I finally can bound with smartphones and windows 10 pc. I will do a lot of test to be sure I have no other compatibility issues than Windows 11.


    Thank you all for the time you've spend on this case.

    Regards

    Thibaud

Related