]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bthidd(8): Add evdev protocol support for bluetooth keyboards and mouses
authorwulf <wulf@FreeBSD.org>
Mon, 30 Apr 2018 12:16:54 +0000 (12:16 +0000)
committerwulf <wulf@FreeBSD.org>
Mon, 30 Apr 2018 12:16:54 +0000 (12:16 +0000)
commit6b2ab68b43c6718e0d54c8a0ebc74d5440e83213
tree83160b3c83ac8cc14f2c77dece1f7fdfa7003006
parentbbb9bd813dcbb853d9b45fa9920eb647b4809894
bthidd(8): Add evdev protocol support for bluetooth keyboards and mouses

User-visible changes:

"-u" is added to to list of command line options supported by bthidd.
Use it to enable evdev support. uinput and evdev modules should be
kld-loaded or compiled into the kernel in that case.

bthidd_evdev_support rc.conf variable is added to control enabling of
evdev support in bthidd startup script. Possible values are: "YES", "NO",
"AUTO"(default). Setting bthidd_evdev_support to "AUTO" inserts "-u" option
if kernel is compiled with EVDEV_SUPPORT option enabled.

Support for consumer HID usage page keyboard events is implemented. Most of
them are available only through evdev protocol.

kern.evdev.rcpt_mask sysctl is checked, so "sysctl kern.evdev.rcpt_mask=12"
should be executed if EVDEV_SUPPORT is compiled into kernel.

It is recommended to regenerate bthidd.conf entries with bthidcontrol(8)
"Query" command to set user-friendly names of bluetooth devices.

Reviewed by: emax, gonzo, wblock (docs), bcr (docs, early version)
Differential Revision: https://reviews.freebsd.org/D13456
15 files changed:
etc/defaults/rc.conf
etc/rc.d/bthidd
usr.sbin/bluetooth/bthidd/Makefile
usr.sbin/bluetooth/bthidd/bthid_config.h
usr.sbin/bluetooth/bthidd/bthidd.8
usr.sbin/bluetooth/bthidd/bthidd.c
usr.sbin/bluetooth/bthidd/bthidd.h
usr.sbin/bluetooth/bthidd/btuinput.c [new file with mode: 0644]
usr.sbin/bluetooth/bthidd/btuinput.h [new file with mode: 0644]
usr.sbin/bluetooth/bthidd/client.c
usr.sbin/bluetooth/bthidd/hid.c
usr.sbin/bluetooth/bthidd/kbd.c
usr.sbin/bluetooth/bthidd/parser.y
usr.sbin/bluetooth/bthidd/server.c
usr.sbin/bluetooth/bthidd/session.c