@@ -347,7 +347,8 @@ profiles_iap_iapd_SOURCES = profiles/iap/main.c
profiles_iap_iapd_LDADD = gdbus/libgdbus-internal.la $(GLIB_LIBS) $(DBUS_LIBS)
if MANPAGES
-man_MANS += tools/rctest.1 tools/l2ping.1 tools/btattach.1 tools/isotest.1
+man_MANS += tools/rctest.1 tools/l2ping.1 tools/btattach.1 tools/isotest.1 \
+ tools/btmgmt.1
endif
if MESH
@@ -468,7 +469,7 @@ manual_pages += tools/hciattach.1 tools/hciconfig.1 \
tools/hcitool.1 tools/hcidump.1 \
tools/rfcomm.1 tools/sdptool.1 tools/ciptool.1 \
tools/rctest.1 tools/l2ping.1 tools/btattach.1 \
- tools/bdaddr.1 tools/isotest.1
+ tools/bdaddr.1 tools/isotest.1 tools/btmgmt.1
if HID2HCI
udevdir = $(UDEV_DIR)
new file mode 100644
@@ -0,0 +1,79 @@
+======
+btmgmt
+======
+
+-------------------------------------
+interactive bluetooth management tool
+-------------------------------------
+
+:Version: BlueZ
+:Copyright: Free use of this software is granted under ther terms of the GNU
+ Lesser General Public Licenses (LGPL).
+:Date: July 2023
+:Manual section: 1
+:Manual group: Linux System Administration
+
+SYNOPSIS
+========
+
+**btmgmt** [--options] [commands]
+
+DESCRIPTION
+===========
+
+**btmgmt(1)** interactive bluetooth management tool. The tool issues commands
+to the Kernel using the Bluetooth Management socket, some commands may require
+net-admin capability in order to work since the Bluetooth Management interface
+is considered a low-level interface meant for the likes of **bluetoothd(1)**,
+it is not recommended for applications to use it directly as it may result in
+unexpected behavior.
+
+OPTIONS
+=======
+
+:-i/--index: Specify adapter index
+:-m-/-monitor: Enable monitor output
+:-t/--timeout: Timeout in seconds for non-interactive mode
+:-v/--version: Display version
+:-i/--init-script: Init script file
+:-h/--help: Display help
+
+COMMANDS
+========
+
+:main: See **bluetoothctl-mgmt(1)**
+:monitor: See **bluetoothctl-monitor(1)**
+
+AUTOMATION
+==========
+
+Two common ways to automate the tool are to pass the commands directly like in
+the follow example:
+
+.. code-block::
+
+ btmgmt <<EOF
+ list
+ show
+ EOF
+
+Or create a script and pass it as init-script:
+
+.. code-block::
+
+ $ vi test-script.bt
+ list
+ show
+ quit
+ :wq
+ $ btmgmt --init-script=test-script
+
+RESOURCES
+=========
+
+http://www.bluez.org
+
+REPORTING BUGS
+==============
+
+linux-bluetooth@vger.kernel.org
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This adds btmgmt.rst which is then converted to btmgmt.1 using rst2man. --- Makefile.tools | 5 +-- tools/btmgmt.rst | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 tools/btmgmt.rst