bluetoothctl-hci(1) Linux System Administration bluetoothctl-hci(1)

bluetoothctl-hci - HCI Submenu

bluetoothctl [--options] [hci.commands]

Note:

This submenu communicates directly with the Bluetooth controller via HCI socket, bypassing the BlueZ D-Bus API. Commands use the Host Controller Interface (HCI) protocol.

Open HCI channel.

> open <index> <chan=raw,user>
HCI controller index number (e.g., 0, 1, 2)
Channel type (raw or user)
> power off
> hci.open 0 user
HCI index 0 user channel opened
> hci.open 0 user
> hci.open 1 user
> hci.open 2 user
> hci.open 0 raw
> hci.open 1 raw

Send HCI command.

> cmd <opcode> [parameters...]
HCI command opcode in hexadecimal format (e.g., 0x0c03)
Optional command parameters as hexadecimal bytes
> hci.cmd 0x0c03
HCI Command complete:
00
> hci.cmd 0x0c03
> hci.cmd 0x1003
> hci.cmd 0x1009
> hci.cmd 0x0c01 0x01
> hci.cmd 0x200f 0x00 0x08
> hci.cmd 0x2008 0x20 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
> hci.cmd 0x0c05 0x02
> hci.cmd 0x0c2a 0x01
> hci.cmd 0x0c23 0x00 0x08

Send HCI data packet.

> send <type=acl,sco,iso> <handle> [data...]
Packet type (acl, sco, or iso)
Connection handle in hexadecimal format (e.g., 0x0000)
Optional data bytes in hexadecimal format
> hci.send acl 0x0000
> hci.send acl 0x0000
> hci.send acl 0x0001 0x48 0x65 0x6c 0x6c 0x6f
> hci.send acl 0x0010 0x01 0x02 0x03 0x04
> hci.send sco 0x0000
> hci.send sco 0x0001 0xaa 0xbb 0xcc
> hci.send sco 0x0002 0x80 0x00 0x80 0x00
> hci.send iso 0x0000
> hci.send iso 0x0001 0x12 0x34 0x56 0x78
> hci.send iso 0x0020 0xa0 0xa1 0xa2 0xa3

Register HCI event handler.

Unregister HCI event handler.

> unregister <event>
HCI event code in hexadecimal format (e.g., 0x0e)
> unregister 0x0e
> unregister 0x0f
> unregister 0x03
> unregister 0x05
> unregister 0x3e

Close HCI channel.

Closes the currently open HCI channel.

http://www.bluez.org

<linux-bluetooth@vger.kernel.org>

Free use of this software is granted under the terms of the GNU Lesser General Public Licenses (LGPL).

December 2024 BlueZ