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

# [Name](#Name)

bluetoothctl-monitor - Monitor Submenu

# [SYNOPSIS](#SYNOPSIS)

**bluetoothctl** \[--options] \[monitor.commands]

This submenu configures advertisement monitors using the [**org.bluez.AdvertisementMonitor(5)**](/man/os/bluez/org.bluez.AdvertisementMonitor.5) and [**org.bluez.AdvertisementMonitorManager(5)**](/man/os/bluez/org.bluez.AdvertisementMonitorManager.5) interfaces.

# [Monitor Commands](#Monitor_Commands)

## [set-rssi-threshold](#set)

Set RSSI threshold parameter

[**Usage**](#Usage)

**&gt; set-rssi-threshold &lt;low\_threshold&gt; &lt;high\_threshold&gt;**

**&lt;low\_threshold&gt;**

Lower RSSI threshold value in dBm for monitoring

**&lt;high\_threshold&gt;**

Higher RSSI threshold value in dBm for monitoring

[**Example Set low threshold to -80 dBm and high threshold to -40 dBm**](#Example)

```
> set-rssi-threshold -80 -40
```

[**Example Set low threshold to -70 dBm and high threshold to -30 dBm**](#Example~2)

```
> set-rssi-threshold -70 -30
```

[**Example Set very sensitive low threshold and moderate high threshold**](#Example~3)

```
> set-rssi-threshold -90 -50
```

[**Example Set less sensitive thresholds for close range monitoring**](#Example~4)

```
> set-rssi-threshold -60 -20
```

## [set-rssi-timeout](#set~2)

Set RSSI timeout parameter

[**Usage**](#Usage~2)

**&gt; set-rssi-timeout &lt;low\_timeout&gt; &lt;high\_timeout&gt;**

**&lt;low\_timeout&gt;**

Timeout value in seconds for low RSSI threshold

**&lt;high\_timeout&gt;**

Timeout value in seconds for high RSSI threshold

[**Example Set low timeout to 5 seconds, high timeout to 10 seconds**](#Example~5)

```
> set-rssi-timeout 5 10
```

[**Example Set quick timeout response for both thresholds**](#Example~6)

```
> set-rssi-timeout 1 5
```

[**Example Set longer timeout periods for stable monitoring**](#Example~7)

```
> set-rssi-timeout 10 30
```

[**Example Set asymmetric timeout values**](#Example~8)

```
> set-rssi-timeout 3 15
```

## [set-rssi-sampling-period](#set~3)

Set RSSI sampling period parameter

[**Usage**](#Usage~3)

**&gt; set-rssi-sampling-period &lt;sampling\_period&gt;**

**&lt;sampling\_period&gt;**

Sampling period in 100ms units (0-255, where 0 means report all, 255 means report only first)

[**Example Set sampling period to 100ms (1 unit)**](#Example~9)

```
> set-rssi-sampling-period 1
```

[**Example Set sampling period to 500ms (5 units)**](#Example~10)

```
> set-rssi-sampling-period 5
```

[**Example Set sampling period to 1 second (10 units)**](#Example~11)

```
> set-rssi-sampling-period 10
```

[**Example Report all advertisements (no sampling)**](#Example~12)

```
> set-rssi-sampling-period 0
```

[**Example Report only first advertisement**](#Example~13)

```
> set-rssi-sampling-period 255
```

## [add-or-pattern](#add)

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

Each pattern requires 3 arguments: &lt;start\_position&gt; &lt;ad\_data\_type&gt; &lt;content\_of\_pattern&gt; Multiple patterns can be specified to create an OR condition.

[**Usage**](#Usage~4)

**&gt; add-or-pattern &lt;start\_pos&gt; &lt;ad\_type&gt; &lt;content&gt; \[start\_pos ad\_type content ...]**

[**Uses**](#Uses)

[**org.bluez.AdvertisementMonitorManager(5)**](/man/os/bluez/org.bluez.AdvertisementMonitorManager.5) method **RegisterMonitor**

**&lt;start\_pos&gt;**

Byte position in advertisement data where pattern matching starts (0-based)

**&lt;ad\_type&gt;**

Advertisement data type (e.g., 9 for Complete Local Name, 1 for Flags)

**&lt;content&gt;**

Hexadecimal pattern content to match

[**Example Monitor for "Samsung" in Complete Local Name (type 9)**](#Example~14)

```
> add-or-pattern 0 9 53616d73756e67
```

[**Example Monitor for devices with Flags type (type 1) containing 0x06**](#Example~15)

```
> add-or-pattern 0 1 06
```

[**Example Monitor for two different patterns (OR condition)**](#Example~16)

```
> add-or-pattern 0 9 53616d73756e67 0 9 4170706c65
```

[**Example Monitor for specific manufacturer data (type 255)**](#Example~17)

```
> add-or-pattern 0 255 4c000215
```

## [get-pattern](#get)

Get advertisement monitor

[**Usage**](#Usage~5)

**&gt; get-pattern &lt;monitor-id/all&gt;**

**&lt;monitor-id/all&gt;**

Monitor ID number to retrieve details for, or "all" for all active monitors

[**Example Get details of monitor ID 0**](#Example~18)

```
> get-pattern 0
```

[**Example Get details of monitor ID 1**](#Example~19)

```
> get-pattern 1
```

[**Example Get details of monitor ID 5**](#Example~20)

```
> get-pattern 5
```

[**Example Get details of all active monitors**](#Example~21)

```
> get-pattern all
```

## [remove-pattern](#remove)

Remove advertisement monitor

[**Usage**](#Usage~6)

**&gt; remove-pattern &lt;monitor-id/all&gt;**

[**Uses**](#Uses~2)

[**org.bluez.AdvertisementMonitorManager(5)**](/man/os/bluez/org.bluez.AdvertisementMonitorManager.5) method **UnregisterMonitor**

**&lt;monitor-id/all&gt;**

Monitor ID number to remove, or "all" to remove all active monitors

[**Example Remove monitor with ID 0**](#Example~22)

```
> remove-pattern 0
```

[**Example Remove monitor with ID 1**](#Example~23)

```
> remove-pattern 1
```

[**Example Remove monitor with ID 3**](#Example~24)

```
> remove-pattern 3
```

[**Example Remove all active advertisement monitors**](#Example~25)

```
> remove-pattern all
```

## [get-supported-info](#get~2)

Get advertisement manager supported features and supported monitor types

[**Usage**](#Usage~7)

**&gt; get-supported-info**

[**Uses**](#Uses~3)

[**org.bluez.AdvertisementMonitorManager(5)**](/man/os/bluez/org.bluez.AdvertisementMonitorManager.5) properties

[**Example Display supported monitor features and types**](#Example~26)

```
> get-supported-info
```

## [print-usage](#print)

Print the command usage

[**Usage**](#Usage~8)

**&gt; print-usage &lt;add-or-pattern&gt;**

**&lt;add-or-pattern&gt;**

Command name to display detailed usage information for

[**Example Show detailed usage for add-or-pattern command**](#Example~27)

```
> print-usage add-or-pattern
```

# [RESOURCES](#RESOURCES)

&lt;http://www.bluez.org&gt;

# [REPORTING BUGS](#REPORTING_BUGS)

&lt;linux-bluetooth@vger.kernel.org&gt;

# [Copyright](#Copyright)

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

July 2023 BlueZ

---

Document: bluetoothctl-monitor(1) from bluez 5.87-r3 (Chainguard OS)
Source: https://github.com/bluez/bluez
