hid2hci
Switch Bluetooth HCI device between HID and HCI
SYNOPSIS
hid2hci [--mode=MODE] [--dev-id=DEV_ID] [--svid=SVID] [--spid=SPID] [--bus=BUS] [--dev=DEV]
PARAMETERS
--mode=MODE
Set mode: hci (default, download firmware and switch to HCI alt interface) or vendor (keep HID interface).
--dev-id=DEV_ID
Specify USB device ID in hex (e.g., 0x4106).
--svid=SVID
USB vendor ID in hex (e.g., 0x0a5c for Broadcom).
--spid=SPID
USB product ID in hex (e.g., 0x21e8).
--bus=BUS
Target USB bus number (decimal).
--dev=DEV
Target USB device number (decimal).
DESCRIPTION
The hid2hci command is a utility designed to reprogram certain Broadcom Bluetooth chipsets that initially present as USB Human Interface Devices (HID), such as keyboards or mice, into standard Bluetooth Host Controller Interface (HCI) mode. This is essential for many laptop-embedded Bluetooth adapters or USB dongles from Broadcom (e.g., BCM20702, BCM43142) that ship in HID mode to comply with USB certification requirements.
It works by identifying the target device via USB bus, vendor ID (VID), product ID (PID), or device ID, then downloading the appropriate vendor-specific firmware and reconfiguring the USB alternate interface to HCI transport. Once switched, the Linux kernel's btusb driver can recognize and use it as a conventional Bluetooth adapter.
This tool is particularly useful during system boot or for live USB environments where Bluetooth isn't detected. It requires root privileges and is part of the BlueZ Bluetooth stack. Failure to switch correctly can render the device unusable until reboot or firmware reset.
CAVEATS
Requires root privileges (sudo). Limited to Broadcom devices; check lsusb for VID:PID. Firmware download may fail on kernel >5.x without patches. Device resets on failure; reboot may restore HID mode.
FIRMWARE SOURCES
Firmware files (BCMxxxx.hcd) must be in /lib/firmware/brcm/; install linux-firmware package.
DETECTION
Run lsusb | grep -i broadcom to find candidates (VID 0a5c).
HISTORY
Developed as part of BlueZ (Linux Bluetooth protocol stack) around 2010-2012 to address Broadcom USB BT chips stuck in HID mode. Integrated in BlueZ 5.x; usage peaked with older laptops (e.g., Lenovo, Dell). Modern kernels include auto-switching via btusb quirks, reducing reliance.
SEE ALSO
hciconfig(8), bluetoothctl(1), lsusb(8), usb_modeswitch(1)


