diff mbox series

[BlueZ] monitor: Update manpage

Message ID 20210427174310.100632-1-hj.tedd.an@gmail.com
State New
Headers show
Series [BlueZ] monitor: Update manpage | expand

Commit Message

Tedd Ho-Jeong An April 27, 2021, 5:43 p.m. UTC
From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch updates the manpage for btmon.
---
 Makefile.am     |  10 +---
 Makefile.tools  |   3 +
 doc/btmon.txt   |  35 -----------
 monitor/btmon.1 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+), 44 deletions(-)
 delete mode 100644 doc/btmon.txt
 create mode 100644 monitor/btmon.1

Comments

Tedd Ho-Jeong An April 28, 2021, 6:28 a.m. UTC | #1
Hi Marcel

On Tue, 2021-04-27 at 20:39 +0200, Marcel Holtmann wrote:
> Hi Tedd,

> 

> > This patch updates the manpage for btmon.

> > ---

> > Makefile.am     |  10 +---

> > Makefile.tools  |   3 +

> > doc/btmon.txt   |  35 -----------

> > monitor/btmon.1 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++

> > 4 files changed, 156 insertions(+), 44 deletions(-)

> > delete mode 100644 doc/btmon.txt

> > create mode 100644 monitor/btmon.1

> > 

> > diff --git a/Makefile.am b/Makefile.am

> > index f98243f72..625a7ce3d 100644

> > --- a/Makefile.am

> > +++ b/Makefile.am

> > @@ -579,14 +579,6 @@ if LIBRARY

> > pkgconfig_DATA = lib/bluez.pc

> > endif

> > 

> > -manual_pages = doc/btmon.1

> > -

> > -if MANPAGES

> > -dist_noinst_MANS += $(manual_pages)

> > -endif

> > -

> > -EXTRA_DIST += $(manual_pages:.1=.txt)

> > -

> > DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \

> > 						--enable-health \

> > 						--enable-midi \

> > @@ -597,7 +589,7 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --

> > enable-library \

> > 						--disable-systemd \

> > 						--disable-udev

> > 

> > -DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests) $(manual_pages)

> > +DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests)

> > 

> > MAINTAINERCLEANFILES = Makefile.in \

> > 	aclocal.m4 configure config.h.in config.sub config.guess \

> > diff --git a/Makefile.tools b/Makefile.tools

> > index 57e858290..069f40ec8 100644

> > --- a/Makefile.tools

> > +++ b/Makefile.tools

> > @@ -49,6 +49,9 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \

> > 				monitor/tty.h

> > monitor_btmon_LDADD = lib/libbluetooth-internal.la \

> > 				src/libshared-mainloop.la $(UDEV_LIBS) -ldl

> > +dist_man_MANS += monitor/btmon.1

> > +else

> > +EXTRA_DIST += monitor/btmon.1

> > endif

> > 

> > if LOGGER

> > diff --git a/doc/btmon.txt b/doc/btmon.txt

> > deleted file mode 100644

> > index 7a7fc537b..000000000

> > --- a/doc/btmon.txt

> > +++ /dev/null

> > @@ -1,35 +0,0 @@

> > -BTMON(1)

> > -========

> > -:doctype: manpage

> > -

> > -

> > -NAME

> > -----

> > -btmon - Bluetooth monitor

> > -

> > -

> > -SYNOPSIS

> > ---------

> > -*btmon* ['OPTIONS']

> > -

> > -

> > -DESCRIPTION

> > ------------

> > -The btmon(1) command provides access to the Bluetooth subsystem monitor

> > -infrastructure for reading HCI traces.

> > -

> > -

> > -AUTHOR

> > -------

> > -btmon was originally written by Marcel Holtmann.

> > -

> > -

> > -RESOURCES

> > ----------

> > -See <http://www.bluez.org/>

> > -

> > -

> > -COPYING

> > --------

> > -Free use of this software is granted under ther terms of the GNU Lesser

> > -General Public Licenses (LGPL).

> > diff --git a/monitor/btmon.1 b/monitor/btmon.1

> > new file mode 100644

> > index 000000000..a9d8430c8

> > --- /dev/null

> > +++ b/monitor/btmon.1

> > @@ -0,0 +1,152 @@

> > +.\" Manpage for btmon

> > +.TH btmon 1 "April 2021" BlueZ "Linux System Administration"

> > +

> > +.SH NAME

> > +btmon - Bluetooth monitor

> 

> I rather not do that. Doing manage with troff is crazy. Please write them

> Restful and then lets use rst2man to create them. See how we do it in iwd

> repository.

> 

Thanks for the comment. I just sent the v2 for review.

Using RST is way more quick and easy to write the manpage.
To be honest with you, it was a painful to use troff for manpage.


> Regards

> 

> Marcel

> 


Regards,
Tedd
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index f98243f72..625a7ce3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -579,14 +579,6 @@  if LIBRARY
 pkgconfig_DATA = lib/bluez.pc
 endif
 
-manual_pages = doc/btmon.1
-
-if MANPAGES
-dist_noinst_MANS += $(manual_pages)
-endif
-
-EXTRA_DIST += $(manual_pages:.1=.txt)
-
 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \
 						--enable-health \
 						--enable-midi \
@@ -597,7 +589,7 @@  DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \
 						--disable-systemd \
 						--disable-udev
 
-DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests) $(manual_pages)
+DISTCLEANFILES = $(pkgconfig_DATA) $(unit_tests)
 
 MAINTAINERCLEANFILES = Makefile.in \
 	aclocal.m4 configure config.h.in config.sub config.guess \
diff --git a/Makefile.tools b/Makefile.tools
index 57e858290..069f40ec8 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -49,6 +49,9 @@  monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
 				monitor/tty.h
 monitor_btmon_LDADD = lib/libbluetooth-internal.la \
 				src/libshared-mainloop.la $(UDEV_LIBS) -ldl
+dist_man_MANS += monitor/btmon.1
+else
+EXTRA_DIST += monitor/btmon.1
 endif
 
 if LOGGER
diff --git a/doc/btmon.txt b/doc/btmon.txt
deleted file mode 100644
index 7a7fc537b..000000000
--- a/doc/btmon.txt
+++ /dev/null
@@ -1,35 +0,0 @@ 
-BTMON(1)
-========
-:doctype: manpage
-
-
-NAME
-----
-btmon - Bluetooth monitor
-
-
-SYNOPSIS
---------
-*btmon* ['OPTIONS']
-
-
-DESCRIPTION
------------
-The btmon(1) command provides access to the Bluetooth subsystem monitor
-infrastructure for reading HCI traces.
-
-
-AUTHOR
-------
-btmon was originally written by Marcel Holtmann.
-
-
-RESOURCES
----------
-See <http://www.bluez.org/>
-
-
-COPYING
--------
-Free use of this software is granted under ther terms of the GNU Lesser
-General Public Licenses (LGPL).
diff --git a/monitor/btmon.1 b/monitor/btmon.1
new file mode 100644
index 000000000..a9d8430c8
--- /dev/null
+++ b/monitor/btmon.1
@@ -0,0 +1,152 @@ 
+.\" Manpage for btmon
+.TH btmon 1 "April 2021" BlueZ "Linux System Administration"
+
+.SH NAME
+btmon - Bluetooth monitor
+
+.SH SYNOPSIS
+.B btmon
+.RI [ OPTIONS ]
+.SH DESCRIPTION
+The btmon(1) command provides access to the Bluetooth subsystem monitor
+infrastructure for reading HCI traces.
+.SH OPTIONS
+.TP
+.BR \-r , " \-\-read " \fIFILE\fR
+Read traces in btsnoop format.
+
+.TP
+.BR \-w , " \-\-write " \fIFILE\fR
+Save traces in btsnoop format.
+
+.TP
+.BR \-a , " \-\-analyze " \fIFILE\fR
+Analyze traces in btsnoop format. It displays the devices found in the
+\fIFILE\fR with its packets by type.
+
+.TP
+.BR \-s , " \-\-server " \fISOCKET\fR
+Start monitor server socket.
+
+.TP
+.BR \-p , " \-\-priority " \fIPRIORITY\fR
+Show only priority or lower for user log.
+.sp
+\fIPRIORITY\fR
+.IP
+.TS
+tab(:);
+l l.
+3:Error
+4:Warning
+6:Information (default)
+7:Debug. 'debug' can be to use.
+.TE
+
+.TP
+.BR \-i , " \-\-index " \fINUM\fR
+Show only specified controller. \fBhci\fINUM\fR is also acceptable.
+This is useful to capture the traces from the specific controller when the
+multiple controllers are presented.
+
+.TP
+.BR \-d , " \-\-tty " \fITTY\fR
+Read data from TTY.
+
+.TP
+.BR \-B , " \-\-rate " \fISPEED\fR
+Set TTY speed. The default \fISPEED\fR is 115300q
+
+.TP
+.BR \-V , " \-\-vendor " \fICOMPID\fR
+Set the default company identifier. The \fICOMPID\fR is a unique number
+assigned by the Bluetooth SIG to a member company and can be found/searched
+from the Bluetooth SIG webpage. For example, Intel is 2 and Realtek is 93.
+
+.TP
+.BR \-M ", " \-\-mgmt
+Open channel for mgmt events.
+
+.TP
+.BR \-t ", " \-\-time
+Show a time instead of time offset.
+
+.TP
+.BR \-T ", " \-\-date
+Show a time and date information instead of time offset.
+
+.TP
+.BR \-S ", " \-\-sco
+Dump SCO traffic in raw hex format.
+
+.TP
+.BR \-A ", " \-\-a2dp
+Dump A2DP stream traffic in a raw hex format.
+
+.TP
+.BR \-E , " \-\-ellisys " \fIIP\fR
+Send Ellisys HCI Injection.
+
+.TP
+.BR \-P ", " \-\-no\-pager
+Disable pager usage while reading the log file.
+
+.TP
+.BR \-J , " \-\-jlink " \fIDEVICE\fR,[\fISERIALNO\fR],[\fIINTERFACE\fR],[\fISPEED\fR]
+Read data from RTT
+
+.TP
+.BR \-R , " \-\-rtt " [\fIADDRESS\fR],[\fIAREA\fR],[\fINAME\fR]
+RTT control block parameters
+
+.TP
+.BR \-C , " \-\-columns " \fIWIDTH\fR
+Output width if not a terminal
+
+.TP
+.BR \-c , " \-\-color " \fIMODE\fR
+Set output color. The possible \fImode\fR values are:
+.sp
+\fIMODE\fR
+.IP
+.TS
+l.
+auto
+always
+never
+.TE
+
+.TP
+.BR \-v , " \-\-version
+Show version
+
+.TP
+.BR \-h , " \-\-help
+Show help options
+
+.SH EXAMPLES
+.TP
+.B Capture the traces from hci0 to hcidump.log file
+.IP
+$ btmon -i hci0 -w hcidump.log
+
+.TP
+.B Open the trace file
+.IP
+$ btmon -r hcidump.log
+
+.SH RESOURCES
+.TP
+<http://www.bluez.org/>
+
+.SH AUTHOR
+Written by Marcel Holtmann <marcel@holtmann.org>.
+.sp
+man page by Tedd Ho-Jeong An <tedd.an@intel.com>.
+
+.SH REPORTING BUGS
+linux-bluetooth@vger.kernel.org
+
+.SH COPYRIGHT
+Free use of this software is granted under ther terms of the GNU Lesser
+General Public Licenses (LGPL).