BTHIDEV(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ¦‹ bthidev(4) β€” Bluetooth Human Interface Device support ✨

okay bestie, so this is a kernel interfaces manual page for bthidev and it's genuinely so cool. it's the driver that handles all your Bluetooth Human Interface Devices, and we're gonna go through it together, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

bthidev* at bthub?

btkbd*   at bthidev? reportid ?
btms*    at bthidev? reportid ?

that's the whole config vibe. slay.


πŸ’– DESCRIPTION πŸ’–

okay so the bthidev driver handles all Bluetooth Human Interface Devices. every single one. main character energy fr 🌈

here's the tea: each HID device can have several components β€” think a keyboard and a mouse chilling in the same device, iconic duo behavior 🫢. these components use different report identifiers so everyone can tell whose data is whose. the bthidev driver can have several children attached that each handle a particular component, and it dispatches data to them based on the report id. literally a little traffic controller but make it fashion ✨

normally, Bluetooth HIDs get attached using the btdevctl(8) program. ngl, that's the standard route.

so during autoconfiguration, the bthidev driver uses these properties πŸ‘‡

  • local-bdaddr β€” the local device address 🏠
  • remote-bdaddr β€” the remote device address πŸ“‘
  • service-name β€” the bthidev driver matches the β€˜HID’ service 🎯
  • control-psm β€” if this is set, it tells you the PSM to use for the Control channel. if it's not set, L2CAP_PSM_HID_CNTL gets used πŸ’«
  • interrupt-psm β€” if this is set, it tells you the PSM to use for the Interrupt channel. if it's not set, L2CAP_PSM_HID_INTR gets used ⚑
  • descriptor β€” this one's required, bestie πŸ™ˆ it's a binary blob β€” the HID descriptor β€” containing info about the reports the device will produce, and it's obtained via SDP. you can't skip this one, it's giving non-negotiable
  • reconnect β€” if this boolean value is set, and it's true, then the bthidev driver will initiate reconnections to the remote device when no connection is present πŸ”
  • link-mode β€” this optional string is the link mode of the baseband link, and it can be one of β€˜auth’, β€˜encrypt’, or β€˜secure’ πŸ”
lowkey important: once the bthidev driver has configured its children, it will initiate a connection to the remote device. if that fails and the reconnect flag is not set, it will then just wait for the device to initiate the connection itself. patient king behavior πŸ‘‘

πŸ‘€ SEE ALSO πŸ‘€

bluetooth(4), bthub(4), btkbd(4), btms(4), btdevctl(8)

go read those too, iykyk πŸ’œ


🌸 HISTORY 🌸

the bthidev driver was written by Iain Hibbert under the sponsorship of Itronix, Inc., and it first appeared in NetBSD 4.0. a legend, fr fr πŸ‘‘


and that's the whole page bestie πŸŽ€πŸ’– β€” this one's from the Debian build, dated April 10, 2007, so it's vintage but it still ate. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from