btmon.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. =====
  2. btmon
  3. =====
  4. -----------------
  5. Bluetooth monitor
  6. -----------------
  7. :Authors: - Marcel Holtmann <marcel@holtmann.org>
  8. - Tedd Ho-Jeong An <tedd.an@intel.com>
  9. :Copyright: Free use of this software is granted under ther terms of the GNU
  10. Lesser General Public Licenses (LGPL).
  11. :Version: BlueZ
  12. :Date: April 2021
  13. :Manual section: 1
  14. :Manual group: Linux System Administration
  15. SYNOPSYS
  16. ========
  17. **btmon** [*OPTIONS* ...]
  18. DESCRIPTION
  19. ===========
  20. The btmon(1) command provides access to the Bluetooth subsystem monitor
  21. infrastructure for reading HCI traces.
  22. OPTIONS
  23. =======
  24. -r FILE, --read FILE Read traces in btsnoop format from *FILE*.
  25. -w FILE, --write FILE Save traces in btsnoop format to *FILE*.
  26. -a FILE, --analyze FILE Analyze traces in btsnoop format from *FILE*.
  27. It displays the devices found in the *FILE* with
  28. its packets by type.
  29. -s SOCKET, --server SOCKET Start monitor server socket.
  30. -p PRIORITY, --priority PRIORITY Show only priority or lower for user log.
  31. .. list-table::
  32. :header-rows: 1
  33. :widths: auto
  34. :stub-columns: 1
  35. * - *PRIORITY*
  36. - NAME
  37. * - **3**
  38. - Error
  39. * - **4**
  40. - Warning
  41. * - **6**
  42. - Information (Default)
  43. * - **7**
  44. - Debug. **debug** can be used.
  45. -i NUM, --index NUM Show only specified controller. *hciNUM* is also
  46. acceptable. This is useful to capture the traces
  47. from the specific controller when the multiple
  48. controllers are presented.
  49. -d TTY, --tty TTY Read data from *TTY*.
  50. -B SPEED, --rate SPEED Set TTY speed. The default *SPEED* is 115300
  51. -V COMPID, --vendor COMPID Set the default company identifier. The *COMPID* is
  52. a unique number assigned by the Bluetooth SIG to
  53. a member company and can be found/searched from the
  54. Bluetooth SIG webpage.
  55. For example, Intel is 2 and Realtek is 93.
  56. -M, --mgmt Open channel for mgmt events.
  57. -t, --time Show a time instead of time offset.
  58. -T, --date Show a time and date information instead of
  59. time offset.
  60. -S, --sco Dump SCO traffic in raw hex format.
  61. -A, --a2dp Dump A2DP stream traffic in a raw hex format.
  62. -E IP, --ellisys IP Send Ellisys HCI Injection.
  63. -P, --no-pager Disable pager usage while reading the log file.
  64. -J OPTIONS, --jlink OPTIONS Read data from RTT. Each options are comma(,)
  65. seprated without spaces.
  66. .. list-table::
  67. :header-rows: 1
  68. :widths: auto
  69. :stub-columns: 1
  70. * - *OPTIONS*
  71. - Description
  72. * - **DEVICE**
  73. - Required. Set the target device.
  74. * - **SERIALNO**
  75. - (Optional) Set the USB serial number. Default is **0**.
  76. * - **INTERFACE**
  77. - (Optional) Target interface. Default is **swd**.
  78. * - **SPEED**
  79. - (Optional) Set target interface speed in kHz. Default is **1000**.
  80. -R OPTIONS, --rtt OPTIONS RTT control block parameters. Each options are
  81. comma(,) seprated without spaces.
  82. .. list-table::
  83. :header-rows: 1
  84. :widths: auto
  85. :stub-columns: 1
  86. * - *OPTIONS*
  87. - Description
  88. * - **ADDRESS**
  89. - (Optional) Address of RTT buffer. Default is **0x00**
  90. * - **AREA**
  91. - (Optional) Size of range to search in RTT buffer. Default is **0**
  92. * - **NAME**
  93. - (Optional) Buffer name. Default is **btmonitor**
  94. -C WIDTH, --columns WIDTH Output width if not a terminal
  95. -c MODE, --color MODE Set output color. The possible *MODE* values are:
  96. **auto|always|never**.
  97. Default value is **auto**
  98. -v, --version Show version
  99. -h, --help Show help options
  100. EXAMPLES
  101. ========
  102. Capture the traces from hci0 to hcidump.log file
  103. ------------------------------------------------
  104. .. code-block::
  105. $ btmon -i hci0 -w hcidump.log
  106. Open the trace file
  107. -------------------
  108. .. code-block::
  109. $ btmon -r hcidump.log
  110. RESOURCES
  111. =========
  112. http://www.bluez.org
  113. REPORTING BUGS
  114. ==============
  115. linux-bluetooth@vger.kernel.org