Scroll to navigation

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

Name

bluetoothctl-scan - Scan Submenu

SYNOPSIS

bluetoothctl [--options] [scan.commands]

This submenu configures discovery filters using org.bluez.Adapter(5) method SetDiscoveryFilter.

Scan Commands

uuids

Set/Get UUIDs filter.

> uuids [all/uuid1 uuid2 ...]
org.bluez.Adapter(5) method SetDiscoveryFilter property UUIDs
[all/uuid1 uuid2 ...]
List of UUIDs to filter for during scanning (default: none, use "all" to scan for any UUID)
> uuids

> uuids 0x1800

> uuids 0x180F

> uuids 0x1800 0x180F

> uuids 0x180A 0x180F 0x181A

> uuids 00001800-0000-1000-8000-00805f9b34fb

> uuids 00001800-0000-1000-8000-00805f9b34fb 0000180f-0000-1000-8000-00805f9b34fb

> uuids all


rssi

Set/Get RSSI filter, and clears pathloss.

This sets the minimum rssi value for reporting device advertisements.

The value is in dBm.

If one or more discovery filters have been set, the RSSI delta-threshold imposed by starting discovery by default will not be applied.


pathloss

Set/Get Pathloss filter, and clears RSSI.

This sets the maximum pathloss value for reporting device advertisements.

The value is in dB.

If one or more discovery filters have been set, the RSSI delta-threshold imposed by starting discovery by default will not be applied.


transport

Set/Get transport filter.

Transport parameter determines the type of scan.

The default is auto.

Possible values:

  • "auto": interleaved scan
  • "bredr": BR/EDR inquiry
  • "le": LE scan only

If "le" or "bredr" Transport is requested and the controller doesn't support it, an org.bluez.Error.Failed error will be returned.

If "auto" transport is requested, the scan will use LE, BREDR, or both, depending on what's currently enabled on the controller.

> transport [auto/bredr/le]
[auto/bredr/le]
Transport type for scanning (optional, shows current if omitted)
> transport

> transport auto

> transport le

> transport bredr


duplicate-data

Set/Get duplicate data filter.

Disables duplicate detection of advertisement data.

When enabled, PropertiesChanged signals will be generated for ManufacturerData and ServiceData every time they are discovered.

> duplicate-data [on/off]
[on/off]
Enable or disable duplicate advertisement data reporting (optional, shows current if omitted)
> duplicate-data

> duplicate-data on

> duplicate-data off


discoverable

Set/Get discoverable filter.

Makes the adapter discoverable while discovering.

If the adapter is already discoverable, setting this filter won't have any effect.

> discoverable [on/off]
[on/off]
Make adapter discoverable during scanning (optional, shows current if omitted)
> discoverable

> discoverable on

> discoverable off


pattern

Set/Get pattern filter.

Discover devices where the pattern matches either the prefix of the address or the device name, which is a convenient way to limit the number of device objects created during a discovery.

When set, it disregards device discoverable flags.

The pattern matching is ignored if there are other clients that don't set any pattern, as it works as a logical OR. Also, setting an empty string "" pattern will match any device found.
> pattern [value]
[value]
Pattern to match device address prefix or name (optional, shows current if omitted)
> pattern

> pattern Samsung

> pattern iPhone

> pattern Headphones

> pattern 00:11:22

> pattern AA:BB:CC

> pattern ""


auto-connect

Set/Get auto-connect filter.

Connect to discovered devices automatically if pattern filter has been set and it matches the device address or name and the device is connectable.

> auto-connect [on/off]
[on/off]
Automatically connect to discovered devices matching pattern filter (optional, shows current if omitted)
> auto-connect

> auto-connect on

> auto-connect off


clear

Clears discovery filter.

> clear [uuids/rssi/pathloss/transport/duplicate-data/discoverable/pattern/auto-connect]
[uuids/rssi/pathloss/transport/duplicate-data/discoverable/pattern/auto-connect]
Specific filter(s) to clear (optional, clears all if omitted)
> clear

> clear uuids

> clear rssi

> clear pathloss

> clear transport

> clear duplicate-data

> clear discoverable

> clear pattern

> clear auto-connect

> clear uuids rssi

> clear transport pattern

> clear pattern auto-connect

> clear rssi pathloss discoverable


RESOURCES

<http://www.bluez.org>

REPORTING BUGS

<linux-bluetooth@vger.kernel.org>

Copyright

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

July 2023 BlueZ