peripheral_hids_keyboard only works with some hosts

Hi there,

I'm running the peripheral_hids_keyboard sample of the nRF Connect SDK 2.5.1 on my nRF52840-DK. After pushing button 4, advertising starts as expected, but I can only connect with some of my phones/tablets.

I can connect with:
- OnePlus 9 Pro phone running Android 13
- Huawei P20 Pro running Android 10

I can't connect with:
- MacBook Air running macOS Ventura 13.6.3 - After pressing the Connect button, a progress indicator shortly appears and then disappears.
- Huawei MediaPad M5 lite 10 tablet running Android 8.0.0 - Upon trying to pair, I get the "Pairing failed. Incorrect pairing key or the device you want to pair with is configured incorrectly" message.
- NPad-Pro tablet running Android 12 - "Pairing..." momentarily appears, then disappears.

The sample doesn't show up in the Bluetooth devices list:
- ThinkPad T520 running Windows 20 Pro 22H2

Can you reproduce such discrepancies across various hosts, and can you make them connect?

Parents
  • Hi Mlac, 

    Do you have any modification to the sample ? Do you use any filter accept list  ? 

    Do you see any log on the NRF52 when you try to pair from those it can not connect ? 

    I would suggest to try capture a sniffer trace so that we can inspect further. 

  • Hi Hung,

    - As it turns out, the NPad-Pro tablet is a piece of crap that doesn't pair with any keyboard. :)
    - The ThinkPad T520 doesn't list other BLE keyboards either. I think it has a Bluetooth classic module that doesn't support BLE.
    - The Huawei MediaPad M5 lite 10 tablet actually works with the peripheral_hids_keyboard sample. I'm unsure why it didn't work the last time.

    This leaves us with the MacBook Air running macOS Ventura 13.6.3. When trying to connect, I can see the following in the console:

    Connected 10:B5:88:72:9A:E6 (public)
    W: Ignoring data for unknown channel ID 0x003a
    Disconnected from 10:B5:88:72:9A:E6 (public) (reason 19)

    Does the above ring a bell? (I've installed the sniffer, but filtering the device seems a bit tricky. I can try to capture a trace if still needed.)

    Thanks for everything!

  • Sorry, I was wrong about CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT; It's not enabled by default, indeed. The sample works on my Mac when this option is enabled.

    Will you add CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y to the prj.conf of this sample so that others won't encounter this issue?

  • Hi Mlac, 

    I think the example followed the requirement of the SIG profile. The keyboard profile has encryption requirement (obviously as you don't want what you type to be transmitted openly) when the mouse profile requirement are more relax as the movement of the mouse, even when tracked doesn't expose too much risk. 

    I would assume it's only on MAC that encryption is required. 

  • Hi Hung/Mlac, I have been following this post because I want to use the HID keyboard routine and I would like to hear from you what to do next...
    I don't know what to do next, will there be a new HID keyboard example or what?
    Many thanks in advance , Regards
  • I wonder if any Nordic stuff reads this tickets...is very difficult to understand the lack  of response

  • isimon: The page you linked no longer exists, and the question I asked has been answered by Hung, so I don't understand what you mean by "the lack of response".

Reply
  • isimon: The page you linked no longer exists, and the question I asked has been answered by Hung, so I don't understand what you mean by "the lack of response".

Children