Composite keyboard+mouse BLE HID device on Zephyr

Hi guys,

I want to make a composite Bluetooth HID device that functions as a keyboard and mouse with the nRF Connect SDK. I've combined the nrf/samples/bluetooth/peripheral_hids_keyboard and nrf/samples/bluetooth/peripheral_hids_mouse samples, but I can't make them work together.

I use two hids_init_obj objects, one for the keyboard and the other for the mouse. I call bt_hids_init() on both objects, and send the reports using bt_hids_inp_rep_send().

Unfortunately, either the keyboard or the mouse function works, but not both. Precisely, if I call bt_hids_init() on the keyboard hids_obj first and on the mouse hids_obj the second, then only the keyboard works and vice versa.

When calling bt_hids_inp_rep_send() on the hids_obj object that doesn't work, it returns -13 which translates to EACCESS.

Any help would be greatly appreciated.

Related