3

I work on an embedded device which is using Bluetooth keyboard for user interaction.

When the keyboard is connected for the first time after reboot or BlueZ restart, BlueZ will establish a connection, and after a short period of time (< 1s), the following appears in kernel log:

input: DA1458x as /devices/virtual/misc/uhid/0005:00D2:0580.0001/input/input1

Until that appears, key presses are not detected by OS (which is logical). Subsequent reconnections work fine because the HID device is already created.

Sometimes, the device is rebooted which will cause BlueZ and kernel to lose the device and require the keyboard to be connected again in order to create input device.

This is bad for UX because we reboot the devices for maintenance updates when they're not in use, so the most commonly pressed key afterwards is power, which is missed because it's sent before BlueZ creates HID device.

Is it possible to instruct BlueZ (or do it elsewhere) to create and bind input device to the paired keyboard right after it starts to avoid this problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.