Commit Graph

333 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
d8a4b126c1 build: Fix distcheck
This fixes the following errors like the following:

../../mesh/mesh-config-json.c:31:10: fatal error: mesh/missing.h: No such file or directory
   31 | #include "mesh/missing.h"
      |          ^~~~~~~~~~~~~~~~
2024-09-11 13:19:54 -04:00
Guido Günther
daa86e06c3 tools/mpris-proxy: Add systemd user unit
That way it will be started automatically which is convenient on phones.
Distributions can then decide part of which install the unit should be.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-09-09 13:02:38 -04:00
Iulia Tanasescu
2f3f63467d client: Add bluetoothctl-assistant.1 man page
This adds bluetoothctl-assistant.rst which is then converted to
bluetoothctl-assistant.1 using rst2man.
2024-08-20 11:20:25 -04:00
Iulia Tanasescu
a3f9970f7a client: Add assistant submenu
This adds the initial implementation for the assistant menu in
bluetoothctl, to detect and print MediaAssistant objects.

The current BAP Broadcast Assistant implementation can be tested
by running bluetoothctl, connecting to a BASS Server, scanning
a Broadcast Source that is streaming a number of BISes with
audio capabilities matching the capabilities of the peer device,
and noticing the MediaAssistant objects being created:

client/bluetoothctl
[bluetooth]# [CHG] Controller 00:60:37:31:7E:3F Pairable: yes
[bluetooth]# AdvertisementMonitor path registered
[bluetooth]# scan on
[bluetooth]# [NEW] Device 00:60:37:94:A6:A3 00-60-37-94-A6-A3
[bluetooth]# connect 00:60:37:94:A6:A3
Attempting to connect to 00:60:37:94:A6:A3
[CHG] Device 00:60:37:94:A6:A3 Connected: yes
[00-60-37-94-A6-A3]# Connection successful
[00-60-37-94-A6-A3]# [NEW] Device 15:65:78:B6:52:F6 15-65-78-B6-52-F6
[00-60-37-94-A6-A3]# [NEW] Assistant
       /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis1
[00-60-37-94-A6-A3]# [NEW] Assistant
       /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis2
[00-60-37-94-A6-A3]# scan off
[00-60-37-94-A6-A3]# Diovery stopped
[00-60-37-94-A6-A3]# disconnect
Attempting to disconnect from 00:60:37:94:A6:A3
[00-60-37-94-A6-A3]# Successful disconnected
[CHG] Device 00:60:37:94:A6:A3 Connected: no
[bluetooth]# [DEL] Assistant
       /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis1
[bluetooth]# [DEL] Assistant
       /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis2
2024-07-18 14:22:44 -04:00
Jan Palus
1955b833c7 build: list new tools/tester.h header in sources
This fixes dist tarballs missing the header.
2024-04-15 10:04:27 -04:00
Luiz Augusto von Dentz
d5a9195a62 build: Fix distcheck
This fixes the following errors:

/usr/bin/mkdir -p '/backend'
/usr/bin/mkdir: cannot create directory ‘/backend’: Permission denied
make[3]: *** [Makefile:4768: install-cupsPROGRAMS] Error 1
2024-03-04 13:11:14 -05:00
Joakim Tjernlund
15032315f3 cups: Use pkg-config to find cups backend dir
Some distributions(Gentoo) patch cups backend path to
something else than libdir. Use pkg-config to find backend
path for cups.
2024-02-26 21:35:06 -05:00
Emil Velikov
116524c01d build: manage .service.in files via configure.ac
Considering we do basic substitution, we don't need to manually sed,
track dependencies, dist nor clean. Just add the files to
AC_CONFIG_FILES() call it a day - it does everything for us.
2024-01-25 13:46:11 -05:00
Emil Velikov
808d008aac build: remove explicit DEPENDENCIES handling
We currently duplicate the DEPENDENCIES handling that autotools does for
us. We have two types of objects - libraries or generated headers.

Former are part of the LDADD, the latter in BUILT_SOURCES.
2024-01-25 13:46:11 -05:00
Emil Velikov
14c7f21292 build: remove .service files from DEPENDENCIES lists
The DEPENDENCES lists are for binary objects, while the service files
are required by systemd (et al) after the install stage. The services
files are referenced by _DATA, so the service.in -> service conversion
can happen then.
2024-01-25 13:46:11 -05:00
Paul Otto
c623de844c client: Add initial manpage of bluetoothctl
This page was accidently not added in the recent documentation update.
2023-12-18 16:28:47 -05:00
Paul Otto
4b353ae99a client: Add bluetoothctl-transport.1 man page
This adds bluetoothctl-transport.rst which is then converted to
bluetoothctl-transport.1 using rst2man.
2023-11-14 13:29:19 -05:00
Paul Otto
c0678a4ddc client: Add bluetoothctl-scan.1 man page
This adds bluetoothctl-scan.rst which is then converted to
bluetoothctl-scan.1 using rst2man.
2023-11-14 13:21:44 -05:00
Paul Otto
3797cedadb client: Add bluetoothctl-player.1 man page
This adds bluetoothctl-player.rst which is then converted to
bluetoothctl-player.1 using rst2man.
2023-11-14 13:04:22 -05:00
Paul Otto
fa5fb919a9 client: Add bluetoothctl-gatt.1 man page
This adds bluetoothctl-gatt.rst which is then converted to
bluetoothctl-gatt.1 using rst2man.
2023-11-14 12:37:53 -05:00
Paul Otto
face899cd8 client: Add bluetoothctl-endpoint.1 man page
This adds bluetoothctl-endpoint.rst which is then converted to
bluetoothctl-endpoint.1 using rst2man.
2023-11-14 11:06:04 -05:00
Paul Otto
6c446bdd32 client: Add bluetoothctl-advertise.1 man page
This adds bluetoothctl-advertise.rst which is then converted to
bluetoothctl-advertise.1 using rst2man.
2023-11-14 10:56:57 -05:00
Paul Otto
0d65d6862a client: Add bluetoothctl-admin.1 man page
This adds bluetoothctl-admin.rst which is then converted to
bluetoothctl-admin.1 using rst2man.
2023-11-13 14:33:47 -05:00
Luiz Augusto von Dentz
82d3d803d4 client: Add bluetoothctl-monitor.1 man page
This adds bluetoothctl-monitor.rst which is then converted to
bluetoothctl-mgmt.1 using rst2man.
2023-07-20 11:14:42 -07:00
Luiz Augusto von Dentz
f0bfd76280 client: Add bluetoothctl-mgmt.1 man page
This adds bluetoothctl-mgmt.rst which is then converted to
bluetooth-mgmt.1 using rst2man.
2023-07-20 11:14:31 -07:00
Luiz Augusto von Dentz
9ccebfa7f9 btmgmt: Add man page
This adds btmgmt.rst which is then converted to btmgmt.1 using rst2man.
2023-07-20 11:14:19 -07:00
Luiz Augusto von Dentz
2b063f47ab client: Add support for mgmt submenu
This moves the functionality of btmgmt into client/mgmt.c so its
commands become available on bluetoothctl via mgmt submenu.
2023-07-14 15:14:02 -07:00
Luiz Augusto von Dentz
a4bde19d3b client: Move common print_* functions to its own file
This move common print_* functions to its own file so they can be
properly reused instead of duplicating the code.
2022-12-02 11:20:26 -08:00
Inga Stotland
1f6553edd8 build: Deprecate meshctl tool
This marks meshctl tool as deprecated since it is not longer
maintained.
2022-10-03 17:59:13 -07:00
Tedd Ho-Jeong An
0da759f1a3 tools/ioctl-tester - Add ioctl-tester
This patch adds ioctl-tester which tests the IOCTL commands.

HCI Down
Device List
Device List - Invalid Param 1
Device Info
Reset Stat
Set Link Mode - ACCEPT
Set Link Mode - MASTER
Set Pkt Type - DM
Set Pkt Type - DH
Set Pkt Type - HV
Set Pkt Type - 2-DH
Set Pkt Type - 2-DH
Set Pkt Type - ALL
Set ACL MTU - 1
Set ACL MTU - 2
Set SCO MTU - 1
Set SCO MTU - 2
Block BDADDR - Success
Block BDADDR - Fail
Unblock BDADDR - Success
Unblock BDADDR - Fail
Connection List - No Conn
Connection List
Connection Info
Connection Info - No Connection
Connection Info - Wrong Type
Authentication Info - No Connection
Authentication Info
2022-09-21 16:37:35 -07:00
Brian Gix
da4b654834 tools: Add mesh-tester to test Kernel mesh support
Ever growing set of tests for Mesh kernel support
2022-09-01 11:52:08 -07:00
Luiz Augusto von Dentz
4314f70667 isotest: Add documentation
This adds isotest.rst which documents the modes and options of
isotest(1) and is then converted isotest.1 manpage.
2022-07-22 13:31:46 -07:00
Luiz Augusto von Dentz
037ed8c5b1 tools: Add isotest tool
This adds isotest tool which can be used to test ISO sockets.
2022-07-22 13:31:46 -07:00
Luiz Augusto von Dentz
26ee34d7be tools: Add iso-tester
This adds iso-tester which tests BTPROTO_ISO socket:

Basic Framework - Success
Basic ISO Socket - Success
Basic ISO Get Socket Option - Success
Basic ISO Set Socket Option - Success
ISO QoS 8_1_1 - Success
ISO QoS 8_2_1 - Success
ISO QoS 16_1_1 - Success
ISO QoS 16_2_1 - Success
ISO QoS 16_2_1 CIG 0x01 - Success
ISO QoS 16_2_1 CIG 0x01 CIS 0x01 - Success
ISO QoS 24_1_1 - Success
ISO QoS 24_2_1 - Success
ISO QoS 32_1_1 - Success
ISO QoS 32_2_1 - Success
ISO QoS 44_1_1 - Success
ISO QoS 44_2_1 - Success
ISO QoS 48_1_1 - Success
ISO QoS 48_2_1 - Success
ISO QoS 48_3_1 - Success
ISO QoS 48_4_1 - Success
ISO QoS 48_5_1 - Success
ISO QoS 48_6_1 - Success
ISO QoS 8_1_2 - Success
ISO QoS 8_2_2 - Success
ISO QoS 16_1_2 - Success
ISO QoS 16_2_2 - Success
ISO QoS 24_1_2 - Success
ISO QoS 24_2_2 - Success
ISO QoS 32_1_2 - Success
ISO QoS 32_2_2 - Success
ISO QoS 44_1_2 - Success
ISO QoS 44_2_2 - Success
ISO QoS 48_1_2 - Success
ISO QoS 48_2_2 - Success
ISO QoS 48_3_2 - Success
ISO QoS 48_4_2 - Success
ISO QoS 48_5_2 - Success
ISO QoS 48_6_2 - Success
ISO QoS - Invalid
ISO Connect2 CIG 0x01 - Success
ISO Send - Success
ISO Receive - Success
ISO Defer - Success
ISO Defer Send - Success
ISO Defer Receive - Success
ISO Defer Reject - Success
ISO Send and Receive - Success
ISO Broadcaster - Success
ISO Broadcaster BIG 0x01 - Success
ISO Broadcaster BIG 0x01 BIS 0x01 - Success
ISO Broadcaster Receiver - Success
2022-07-22 13:31:45 -07:00
Luiz Augusto von Dentz
0bd5350459 monitor/att: Decode attribute type
This attempt to decode the attribute type if its gatt_db can be loaded:

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Write Request (0x12) len 4
        Handle: 0x000b Type: Client Characteristic Configuration (0x2902)
          Data: 0200
2022-05-18 15:35:49 -07:00
Luiz Augusto von Dentz
5efc737f49 monitor: Move ATT decoding function into its own file
This moves ATT decoding function from l2cap.c to att.c.
2022-05-18 15:35:47 -07:00
Luiz Augusto von Dentz
d204e84c06 client: Add support for player submenu
This moves adds the functionality of bluetooth-player into
bluetoothctl.
2022-03-30 12:54:29 -07:00
Michael Nosthoff
51c34da9d6 Makefile.tools: remove duplicate link entry 2022-02-18 13:25:43 -08:00
Luiz Augusto von Dentz
cfab569484 build: Replace use of g_memdup with util_memdup
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:

  warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
  [-Wdeprecated-declarations]

g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
2022-01-06 12:58:39 -08:00
Luiz Augusto von Dentz
4a00535fa3 emulator: Add support for vendor commands
This adds support for vendor commands reserving a single opcode (0xfc10)
so it can be extended using subcommands, similar to how MSFT works.

The first subcommand (0x00) enables the emulator to generate arbitrary
events using the commands parameters:

> tools/hcitool cmd 3f 10 00 22 24 d0 d0 d0 d0 d0 d0 ff ff
< HCI Command: Vendor (0x3f|0x0010) plen 11
        00 22 24 d0 d0 d0 d0 d0 d0 ff ff
	."$........
Bluetooth: hci0: Malformed HCI Event: 0x22
> HCI Event: Inquiry Result with R.. (0x22) plen 9
        Num responses: 36
        Page scan repetition mode: Reserved (0xff)
        Page period mode: Reserved (0xff)
        Class: 0xffffd0
          Major class: Uncategorized, specific device code not specified
          Minor class: 0x34
          Limited Discoverable Mode
          invalid service class
        Clock offset: 0x6368
        RSSI: 105 dBm (0x69)
> HCI Event: Command Complete (0x0e) plen 4
      Vendor (0x3f|0x0010) ncmd 1
        Status: Success (0x00)
2022-01-05 15:06:40 -08:00
Luiz Augusto von Dentz
135f5d8258 hciemu: Use vhci_open to instanciate a vhci btdev
This makes use of vhci_open to isntanciate the vhci btdev since that
has proper support for reading the index assigned to it.
2021-10-18 13:04:25 -07:00
Yun-Hao Chung
4f3adc7bef client: add admin submenu and allow command
This creates a menu - admin and add a commands to bluetoothctl
- allow [clear/uuid1 uuid2 ...]

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
2021-08-11 11:18:22 -07:00
Tedd Ho-Jeong An
6552b57237 tools: Convert manpages to rst format
This patch converts existing manpages in tools into the reStructuredText
format.
2021-05-04 16:49:02 -07:00
Tedd Ho-Jeong An
b66f406e1e monitor: Convert manpage to rst format
This patch adds support to convert reStructuredText formatted btmon
manpage to manpage with rst2man tool.
2021-05-04 16:49:01 -07:00
Tedd Ho-Jeong An
c0cae92548 build: Fix manpage enable flag
This patch fixes the manpages installation with --enable-manpages option
so the manpages are not installed by default if the option is not set
during the configuration.
2021-05-04 16:49:01 -07:00
Inga Stotland
d9bc40218d tools/mesh-cfgtest: Non-iteractive test for mesh
This adds a non-interactive test to excercise different datapaths in
bluetooth-meshd. The test cases utilize D-Bus based mesh APIs, e.g.,
to create a new network, import a node, import NetKey, import a remote
node.
2021-04-10 10:29:27 -07:00
Marcel Holtmann
8e2d46d8b1 monitor: Add skeleton for Microsoft HCI extension 2021-03-19 18:44:12 +01:00
Luiz Augusto von Dentz
e2e198ced4 tools: Remove legacy code for CSR controllers
This code has not been touched for ages and very unlikely that someone
will be using this nowadays as most of these controller specific
transports are handled by the kernel nowadays.
2020-09-25 15:03:44 -07:00
Tedd Ho-Jeong An
3d22393db2 build: Add SPDX License Identifier
This patch adds SPDX License Identifier and removes the license text.

-------------------------------------
       License            COUNT
-------------------------------------
 GPL-2.0-or-later     :      6

License: GPL-2.0-or-later
   Makefile.am
   Makefile.mesh
   Makefile.obexd
   Makefile.plugins
   Makefile.tools
   configure.ac
2020-09-21 16:20:26 -07:00
Howard Chung
664e10ff7e client: Implement basic interface of ADV monitor in bluetoothctl
This patch implements some basic functions for ADV monitor in
bluetoothctl

[bluetooth]# show
...
Advertisement Monitor Features:
	SupportedMonitorTypes: or_patterns
2020-09-16 09:37:42 -07:00
Tedd Ho-Jeong An
f62e1f8d03 tools/btpclientctl: Add btpclient test application
This patch adds a test application for btpclient, which exercises the
BTP API.
2020-09-14 12:30:53 -07:00
Inga Stotland
ee436b6e45 tools/mescfg-client: Use local routines for config write
This removes dependencies on internal structures of
mesh/mesh-config-json.c.
2020-04-03 00:29:32 -07:00
Inga Stotland
496ed29398 tools/mesh-cfgclient: Add support for virtual labels
This adds commands to generate and use virtual addresses for
configuring remote node's publication and subscription.

New commands:
virt-add - generate a new label and calculate virtual address
group-list - displays group addresses that are in use and available
             virtual labels with corresponding virtual addresses
2020-02-26 11:20:08 -08:00
Inga Stotland
5c6e6e5524 tools/mesh: add initial support for config storage
This adds support for storing the state of a mesh network.
The configuration is written out in JSON format. The initial
configuration file is generated automatically upon the
successful completion of "create" command form the main menu.
2019-11-04 14:54:38 -08:00
Inga Stotland
d2ff309262 tools/mesh: move remote node processing to a separate file
This confines the functionality related to remote node
housekeeping into a separate file remote.c
2019-11-04 14:54:38 -08:00