hcitool.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. =======
  2. hcitool
  3. =======
  4. -------------------------------
  5. Configure Bluetooth connections
  6. -------------------------------
  7. :Authors: - Maxim Krasnyansky <maxk@qualcomm.com>
  8. - Marcel Holtmann <marcel@holtmann.org>
  9. - Fabrizio Gennari <fabrizio.gennari@philips.com>
  10. :Version: BlueZ
  11. :Copyright: Free use of this software is granted under ther terms of the GNU
  12. Lesser General Public Licenses (LGPL).
  13. :Date: Nov 12, 2002
  14. :Manual section: 1
  15. :Manual group: Linux System Administration
  16. SYNOPSIS
  17. ========
  18. **hcitool** -h
  19. **hcitool** *COMMAND* --help
  20. **hcitool** [-i *hciX*] [*COMMAND* [*PARAMETERS*]]
  21. DESCRIPTION
  22. ===========
  23. **hcitool(1)** is used to configure Bluetooth connections and send some special
  24. command to Bluetooth devices. If no **command** is given, or if the option
  25. **-h** is used, *hcitool* prints some usage information and exits.
  26. OPTIONS
  27. =======
  28. -i <hciX> The command is applied to device *hciX*, which must be the name of
  29. an installed Bluetooth device. If not specified, the command will
  30. be sent to the first available Bluetooth device.
  31. -h Gives a list of possible commands
  32. COMMANDS
  33. ========
  34. dev
  35. Display local devices
  36. inq
  37. Inquire remote devices. For each discovered device, Bluetooth device
  38. address, clock offset and class are printed.
  39. scan
  40. Inquire remote devices. For each discovered device, device name are printed.
  41. name <*bdaddr*>
  42. Print device name of remote device with Bluetooth address *bdaddr*.
  43. info <*bdaddr*>
  44. Print device name, version and supported features of remote device with
  45. Bluetooth address *bdaddr*.
  46. spinq
  47. Start periodic inquiry process. No inquiry results are printed.
  48. epinq
  49. Exit periodic inquiry process.
  50. cmd <*ogf*> <*ocf*> [*parameters*]
  51. Submit an arbitrary HCI command to local device. *ogf*, *ocf* and
  52. parameters are hexadecimal bytes.
  53. con
  54. Display active baseband connections
  55. cc [--*role*\=c|p] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
  56. Create baseband connection to remote device with Bluetooth address *bdaddr*.
  57. Option **--pkt-type** specifies a list of allowed packet types.
  58. <*ptype*> is a comma-separated list of packet types, where the possible
  59. packet types are **DM1**, **DM3**, **DM5**, **DH1**, **DH3**, **DH5**,
  60. **HV1**, **HV2**, **HV3**. Default is to allow all packet types.
  61. Option **--role** can have value **c** (do not allow role switch, stay
  62. central) or **p** (allow role switch, become peripheral if the peer asks to
  63. become central). Default is **c**.
  64. dc <*bdaddr*> [*reason*]
  65. Delete baseband connection from remote device with Bluetooth address
  66. *bdaddr*.
  67. The reason can be one of the Bluetooth HCI error codes.
  68. Default is **19** for user ended connections. The value must be given in
  69. decimal.
  70. sr <*bdaddr*> <*role*>
  71. Switch role for the baseband connection from the remote device to
  72. **central** or **peripheral**.
  73. cpt <*bdaddr*> <*ptypes*>
  74. Change packet types for baseband connection to device with Bluetooth
  75. address *bdaddr*. *ptypes* is a comma-separated list of packet types,
  76. where the possible packet types are **DM1**, **DM3**, **DM5**, **DH1**,
  77. **DH3**, **DH5**, **HV1**, **HV2**, **HV3**.
  78. rssi <*bdaddr*>
  79. Display received signal strength information for the connection to the
  80. device with Bluetooth address *bdaddr*.
  81. lq <*bdaddr*>
  82. Display link quality for the connection to the device with Bluetooth
  83. address *bdaddr*.
  84. tpl <*bdaddr*> [*type*]
  85. Display transmit power level for the connection to the device with
  86. Bluetooth address *bdaddr*.
  87. The *type* can be **0** for the current transmit power level (which is
  88. default) or **1** for the maximum transmit power level.
  89. afh <*bdaddr*>
  90. Display AFH channel map for the connection to the device with Bluetooth
  91. address *bdaddr*.
  92. lp <*bdaddr*> [*value*]
  93. With no value, displays link policy settings for the connection to the
  94. device with Bluetooth address *bdaddr*.
  95. If *value* is given, sets the link policy settings for that connection to
  96. *value*. Possible values are **RSWITCH**, **HOLD**, **SNIFF** and **PARK**.
  97. lst <*bdaddr*> [*value*]
  98. With no value, displays link supervision timeout for the connection to
  99. the device with Bluetooth address *bdaddr*.
  100. If *value* is given, sets the link supervision timeout for that connection
  101. to *value* slots, or to infinite if value is 0.
  102. auth <*bdaddr*>
  103. Request authentication for the device with Bluetooth address *bdaddr*.
  104. enc <*bdaddr*> [*encrypt*]
  105. **enable** or **disable** the encryption for the device with Bluetooth
  106. address *bdaddr*.
  107. key <*bdaddr*>
  108. Change the connection link key for the device with Bluetooth address
  109. *bdaddr*.
  110. clkoff <*bdaddr*>
  111. Read the clock offset for the device with Bluetooth address *bdaddr*.
  112. clock [*bdaddr*] [*clock*]
  113. Read the clock for the device with Bluetooth address *bdaddr*.
  114. The *clock* can be **0** for the local clock or **1** for the piconet
  115. clock (which is default).
  116. lescan [--*privacy*] [--*passive*] [--*acceptlist*] [--*discovery*\=g|l] [--*duplicates*]
  117. Start LE scan
  118. leinfo [--*static*] [--*random*] <*bdaddr*>
  119. Get LE remote information
  120. lealadd [--*random*] <*bdaddr*>
  121. Add device to LE Accept List
  122. lealrm <*bdaddr*>
  123. Remove device from LE Accept List
  124. lealsz
  125. Read size of LE Accept List
  126. lealclr
  127. Clear LE Accept List
  128. lerladd [--*local_irk*] [--*peer_irk*] [--*random*] <*bdaddr*>
  129. Add device to LE Resolving List
  130. lerlrm <*bdaddr*>
  131. Remove device from LE Resolving List
  132. lerlclr
  133. Clear LE Resolving List
  134. lerlsz
  135. Read size of LE Resolving List
  136. lerlon
  137. Enable LE Address Resolution
  138. lerloff
  139. Disable LE Address Resolution
  140. lecc [--*static*] [--*random*] <*bdaddr*> | [--*acceptlist*]
  141. Create a LE Connection
  142. ledc <*handle*> [*reason*]
  143. Disconnect a LE Connection
  144. lecup <*handle*> <*min*> <*max*> <*latency*> <*timeout*>
  145. LE Connection Update
  146. RESOURCES
  147. =========
  148. http://www.bluez.org
  149. REPORTING BUGS
  150. ==============
  151. linux-bluetooth@vger.kernel.org