hcitool(1)
π hcitool(1): the Bluetooth config bestie π
okay so bestie, welcome to hcitool(1) from the Linux System Administration manual. This is the iconic little page for configuring Bluetooth connections and sending special commands to Bluetooth devices. Itβs giving βI know my HCI commands and Iβm not afraid to use themβ energy. π
β¨ NAME β¨
hcitool β Configure Bluetooth connections. periodt.
πΈ SYNOPSIS πΈ
hcitool -h
hcitool COMMAND --help
hcitool [-i hciX] [COMMAND [PARAMETERS]]
π¦ DESCRIPTION π¦
hcitool(1) is used to configure Bluetooth connections and send some special command to Bluetooth devices. fr fr, thatβs the whole vibe.
If no command is given, or if the option -h is used, hcitool prints some usage information and exits. So if youβre ever like βwhat do I even type,β itβs got you. π«Ά
π OPTIONS π
-i <hciX>β the command gets applied to devicehciX, and that has to be the name of an installed Bluetooth device. If you donβt specify it, the command will be sent to the first available Bluetooth device. lowkey convenient.-hβ gives a list of possible commands. your little menu moment. β¨
π₯ COMMANDS π₯
devβ display local devices. your local Bluetooth besties.inqβ inquire remote devices. For each discovered device, the Bluetooth device address, clock offset and class are printed. itβs giving discovery era.scanβ inquire remote devices. For each discovered device, the device name are printed. yes, the original says it like that; we keep the facts, not the grammar vibes.name <bdaddr>β print the device name of the remote device with Bluetooth addressbdaddr.info <bdaddr>β print the device name, version and supported features of the remote device with Bluetooth addressbdaddr.spinqβ start periodic inquiry process. No inquiry results are printed. itβs doing its own thing quietly.epinqβ exit periodic inquiry process.cmd <ogf> <ocf> [parameters]β submit an arbitrary HCI command to the local device.ogf,ocfandparametersare hexadecimal bytes. very βI speak HCIβ of you.conβ display active baseband connections.cc [--role=c|p] [--pkt-type=<ptype>] <bdaddr>β create a baseband connection to the remote device with Bluetooth addressbdaddr.- Option
--pkt-typespecifies a list of allowed packet types.<ptype>is a comma-separated list of packet types, where the possible packet types areDM1,DM3,DM5,DH1,DH3,DH5,HV1,HV2,HV3. Default is to allow all packet types. - Option
--rolecan have valuec(do not allow role switch, stay central) orp(allow role switch, become peripheral if the peer asks to become central). Default isc.
- Option
dc <bdaddr> [reason]β delete the baseband connection from the remote device with Bluetooth addressbdaddr.- The reason can be one of the Bluetooth HCI error codes. Default is
19for user ended connections. The value must be given in decimal.
- The reason can be one of the Bluetooth HCI error codes. Default is
sr <bdaddr> <role>β switch role for the baseband connection from the remote device to central or peripheral.cpt <bdaddr> <ptypes>β change packet types for the baseband connection to the device with Bluetooth addressbdaddr.ptypesis a comma-separated list of packet types, where the possible packet types areDM1,DM3,DM5,DH1,DH3,DH5,HV1,HV2,HV3.rssi <bdaddr>β display received signal strength information for the connection to the device with Bluetooth addressbdaddr.lq <bdaddr>β display link quality for the connection to the device with Bluetooth addressbdaddr.tpl <bdaddr> [type]β display transmit power level for the connection to the device with Bluetooth addressbdaddr.- The type can be
0for the current transmit power level (which is default) or1for the maximum transmit power level.
- The type can be
afh <bdaddr>β display AFH channel map for the connection to the device with Bluetooth addressbdaddr.lp <bdaddr> [value]β with no value, displays link policy settings for the connection to the device with Bluetooth addressbdaddr.- If
valueis given, sets the link policy settings for that connection tovalue. Possible values areRSWITCH,HOLD,SNIFFandPARK.
- If
lst <bdaddr> [value]β with no value, displays link supervision timeout for the connection to the device with Bluetooth addressbdaddr.- If
valueis given, sets the link supervision timeout for that connection tovalueslots, or to infinite ifvalueis0.
- If
auth <bdaddr>β request authentication for the device with Bluetooth addressbdaddr.enc <bdaddr> [encrypt]β enable or disable the encryption for the device with Bluetooth addressbdaddr.key <bdaddr>β change the connection link key for the device with Bluetooth addressbdaddr.clkoff <bdaddr>β read the clock offset for the device with Bluetooth addressbdaddr.clock [bdaddr] [clock]β read the clock for the device with Bluetooth addressbdaddr.- The clock can be
0for the local clock or1for the piconet clock (which is default).
- The clock can be
lescan [--privacy] [--passive] [--acceptlist] [--discovery=g|l] [--duplicates]β start LE scan. thatβs the LE scan moment, no cap.leinfo [--static] [--random] <bdaddr>β get LE remote information.lealadd [--random] <bdaddr>β add device to LE Accept List.lealrm <bdaddr>β remove device from LE Accept List.lealszβ read size of LE Accept List.lealclrβ clear LE Accept List.lerladd [--local_irk] [--peer_irk] [--random] <bdaddr>β add device to LE Resolving List.lerlrm <bdaddr>β remove device from LE Resolving List.lerlclrβ clear LE Resolving List.lerlszβ read size of LE Resolving List.lerlonβ enable LE Address Resolution.lerloffβ disable LE Address Resolution.lecc [--static] [--random] <bdaddr> | [--acceptlist]β create a LE Connection.ledc <handle> [reason]β disconnect a LE Connection.lecup <handle> <min> <max> <latency> <timeout>β LE Connection Update.
π RESOURCES π
β REPORTING BUGS β
<linux-bluetooth@vger.kernel.org>
π Author π
Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>, Fabrizio Gennari <fabrizio.gennari@philips.com>
π Copyright π
Free use of this software is granted under the terms of the GNU Lesser General Public Licenses (LGPL).
This iconic page is brought to you by BlueZ, dated Nov 12, 2002, and the manual tag is hcitool(1). slay. πβ¨
π¦ where this page comes from
- arch rolling: bluez-deprecated-tools 5.87-2 Β· GPL-2.0-only
- nixpkgs unstable: bluez 5.87
- ubuntu stonking: bluez 5.87-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms