bluetoothctl-monitor(1) Linux System Administration bluetoothctl-monitor(1)

bluetoothctl-monitor - Monitor Submenu

bluetoothctl [--options] [monitor.commands]

This submenu configures advertisement monitors using the org.bluez.AdvertisementMonitor(5) and org.bluez.AdvertisementMonitorManager(5) interfaces.

Set RSSI threshold parameter

> set-rssi-threshold <low_threshold> <high_threshold>
<low_threshold>
Lower RSSI threshold value in dBm for monitoring
<high_threshold>
Higher RSSI threshold value in dBm for monitoring
> set-rssi-threshold -80 -40
> set-rssi-threshold -70 -30
> set-rssi-threshold -90 -50
> set-rssi-threshold -60 -20

Set RSSI timeout parameter

> set-rssi-timeout <low_timeout> <high_timeout>
<low_timeout>
Timeout value in seconds for low RSSI threshold
<high_timeout>
Timeout value in seconds for high RSSI threshold
> set-rssi-timeout 5 10
> set-rssi-timeout 1 5
> set-rssi-timeout 10 30
> set-rssi-timeout 3 15

Set RSSI sampling period parameter

> set-rssi-sampling-period <sampling_period>
<sampling_period>
Sampling period in 100ms units (0-255, where 0 means report all, 255 means report only first)
> set-rssi-sampling-period 1
> set-rssi-sampling-period 5
> set-rssi-sampling-period 10
> set-rssi-sampling-period 0
> set-rssi-sampling-period 255

Register 'or pattern' type monitor with the specified RSSI parameters

Each pattern requires 3 arguments: <start_position> <ad_data_type> <content_of_pattern> Multiple patterns can be specified to create an OR condition.

> add-or-pattern <start_pos> <ad_type> <content> [start_pos ad_type content ...]
org.bluez.AdvertisementMonitorManager(5) method RegisterMonitor
<start_pos>
Byte position in advertisement data where pattern matching starts (0-based)
<ad_type>
Advertisement data type (e.g., 9 for Complete Local Name, 1 for Flags)
<content>
Hexadecimal pattern content to match
> add-or-pattern 0 9 53616d73756e67
> add-or-pattern 0 1 06
> add-or-pattern 0 9 53616d73756e67 0 9 4170706c65
> add-or-pattern 0 255 4c000215

Get advertisement monitor

> get-pattern <monitor-id/all>
<monitor-id/all>
Monitor ID number to retrieve details for, or "all" for all active monitors
> get-pattern 0
> get-pattern 1
> get-pattern 5
> get-pattern all

Remove advertisement monitor

> remove-pattern <monitor-id/all>
org.bluez.AdvertisementMonitorManager(5) method UnregisterMonitor
<monitor-id/all>
Monitor ID number to remove, or "all" to remove all active monitors
> remove-pattern 0
> remove-pattern 1
> remove-pattern 3
> remove-pattern all

Get advertisement manager supported features and supported monitor types

Print the command usage

> print-usage <add-or-pattern>
<add-or-pattern>
Command name to display detailed usage information for
> print-usage add-or-pattern

http://www.bluez.org

<linux-bluetooth@vger.kernel.org>

Free use of this software is granted under the terms of the GNU Lesser General Public Licenses (LGPL).

July 2023 BlueZ