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

  • Hello

    I will try to add all, in my application I already added

    CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y
    so I can re bound after forgetting  the peripheral from the central.
    Note that I can't enable CONFIG_BT_ID_ALLOW_UNAUTH_OVERWRITE and CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE at the same time
    Regards
    Thibaud
  • I will try this afternoon if it help me to decrease CONFIG_BT_MAX CONN & CONFIG_BT_MAX_PAIRED to 2, because I don't have anymore the phone which is causing me troubles. 

    But it did not help me to go back to the SoftDevice Controller. I still need Zephyr controller to be able to bound with Windows computer

    Regards

    Thibaud

  • The only two you should need are really:

    CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
    CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y

    Also, maybe the Windows PC's you have issue with le secure connections, it should be possible to disable le secure connection by for instance using:

    BT_TINYCRYPT_ECC=n
    BT_CTLR_ECDH=n

    I rather you experiment with this than you start modifying the application in any way. I am not able to see anyone else reporting your problems, so I still suspect it is something in specific at your end that cause this.

    Kenneth

  • 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

Reply
  • 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

Children
Related