hid2hci
Switch Bluetooth HCI device between HID and HCI
SYNOPSIS
hid2hci [--method=METHOD] [--reset] [VENDOR_ID:PRODUCT_ID]
PARAMETERS
VENDOR_ID:PRODUCT_ID
The vendor and product ID (in hexadecimal) of the USB HID device to switch. If omitted, all supported HID devices are attempted.
--method=METHOD
Specifies the method used to switch the device. Supported methods are device-specific, often involving sending a specific feature report to the device. Check device documentation for supported METHOD types. If unspecified tries all methods.
--reset
Resets the device after the switch attempt.
DESCRIPTION
The hid2hci command is a utility in Linux used to switch USB HID (Human Interface Device) devices into HCI (Host Controller Interface) devices. This is primarily done for Bluetooth devices that initially present themselves as HID devices to avoid requiring specific drivers before Bluetooth functionality is activated. By switching the device to HCI mode, it can then be managed using standard Bluetooth tools like hciconfig, bluetoothctl and BlueZ stack. This is a specific requirement for some Bluetooth devices, particularly those that need to operate in low-power modes or require specific HCI commands for configuration. The command typically interacts with the USB device through ioctl calls and may require root privileges.
It is a niche tool largely relevant to Bluetooth driver development and debugging, rather than general users.
CAVEATS
This command can potentially brick a device if used incorrectly or with an unsupported device. Always consult device documentation before using hid2hci. Requires root privileges.
SWITCHING METHODS
The specific methods used to switch a device from HID to HCI vary greatly depending on the device manufacturer. These methods often involve sending specific control messages or feature reports to the device through USB. The exact details of these methods are usually proprietary and might not be publicly documented. Therefore, support for a given device needs to be explicitly added to hid2hci by developers through trial and error, or by reverse engineering the device's firmware.
DEVICE SUPPORT
hid2hci only supports devices for which a specific switching method has been implemented. Attempting to use it on an unsupported device may result in failure or even render the device unusable. The success of the command is heavily dependent on correct Vendor ID and Product ID. Always verify this information before executing.
HISTORY
hid2hci has been part of the BlueZ utilities package for a long time. Development focused on supporting specific Bluetooth devices that require this initial HID to HCI switch for proper operation. The command aims to be simple and direct to the hardware, minimizing dependencies and offering a low-level tool for device control. Usage has remained largely within Bluetooth driver development and debugging contexts.
SEE ALSO
hciconfig(8), bluetoothctl(1), lsusb(8)