Linux-enabled BLE HID peripheral

I am trying to develop a BLE HID peripheral that can be used on Ubuntu 24.04.

When I try to connect the peripheral_hids_mouse example to a Linux machine, it immediately disconnects and becomes unusable.

Is there any sample code that has been confirmed to work with Linux machines?
Or is this a problem specific to my environment?

I am using nRF52840DK and NCS 3.0.2.

The host Linux machine is a Lenovo ThinkPad T14s. It works fine with other Logitech devices.

Parents Reply Children
  • As a result, I still couldn't connect to the Linux machine.

    Regular advertising started
    [00:00:04.936,492] <wrn> bt_smp: The in-progress pairing has been deleted!
    Disconnected from 14:5A:FC:4B:71:00 (public), reason 0x08

    The MITM popup is no longer displayed, but I still get immediately disconnected.
    There seems to be another problem...

    In conclusion, the title of this post indicates that there is a problem with the sample code, but I am still interested in the cause of this problem.
    It is probably the same cause as the mouse I am currently developing that cannot connect to a Linux machine.

  • I understand. Can you please try to capture a sniffer trace of the connection? It will make it a bit clearer exactly what the operating system is expecting to use with the HID Mouse.

    Best regards,

    Edvin

  • I did a bit of research and found information that Linux forces pairing on the HoG.
    I'm not sure, but the validity of requiring security for HIDs is clear, so this is likely the cause.

    I could probably rewrite the sample code for MITM-less pairing, but I'd rather focus on my product.

    My one request would be if Nordic provided more practical sample code (that runs on Windows, Mac, Linux, Android, and iOS).


    Thank you for your support !!

Related