BluetoothSignalStrengthFilter BluetoothSignalStrengthFilter BluetoothSignalStrengthFilter BluetoothSignalStrengthFilter BluetoothSignalStrengthFilter Class

Definition

Groups parameters used to configure received signal strength indicator (RSSI)-based filtering.

public : sealed class BluetoothSignalStrengthFilter
struct winrt::Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter
public sealed class BluetoothSignalStrengthFilter
Public NotInheritable Class BluetoothSignalStrengthFilter
var bluetoothSignalStrengthFilter = new bluetoothSignalStrengthFilter();
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Remarks

The BluetoothSignalStrengthFilter class only accepts a limited range for its properties. However, depending on how this class is used by an app, additional restrictions may apply. For example, the valid range for RSSI values differs between Bluetooth LE and Bluetooth BR/EDR devices.

The valid range for these properties are as follows:

  • InRangeThresholdInDBm - The minimum threshold for an RSSI event to be considered in range. The valid range is -128 to 127.
  • OutOfRangeThresholdInDBm - The minimum threshold for an RSSI event to be considered out of range. The valid range is -128 to 127.
  • OutOfRangeTimeout - Timeout for an RSSI event to be considered out of range. The valid range is equal or greater than 1 second.
  • SamplingInterval - The interval at which RSSI events are sampled. The valid range is equal or greater than 0. Any sampling interval greater or equal to 25.5 seconds will disable sampling entirely. In that special case, the filtering is trigger-based. There are two possible states for filtering RSSI values for any device:
  • In range.
  • Out of range. Any RSSI events are propagated if they are considered in range. This includes events with RSSI values lower or equal than OutOfRangeThresholdInDBm as long as OutOfRangeTimeout has not expired.

This class has additional limitations on its properties when used by the BluetoothLEAdvertisementWatcher class. An exception will be thrown when the BluetoothLEAdvertisementWatcher is started with parameters outside of the valid range for BluetoothLEAdvertisementWatcher.

In general, there are three main use cases for this API:

@Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.InRangeThresholdInDBm?text=InRangeThresholdInDBm @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeTimeout?text=OutOfRangeTimeout @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.SamplingInterval?text=SamplingInterval Behavior
Any<= @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.InRangeThresholdInDBm?text=InRangeThresholdInDBm >= 10Will receive all RSSI events as they arrive as long as they are considered "in range". The events are considered "out of range" if @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeTimeout?text=OutOfRangeTimeout expires without any events or without any events with RSSI values greater than @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm. No additional events are generated when @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeTimeout?text=OutOfRangeTimeout expires.
Any<= @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.InRangeThresholdInDBm?text=InRangeThresholdInDBm >= 1(0, 25.5)Will receive RSSI events on a regular interval defined by @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.SamplingInterval?text=SamplingInterval as long as they are considered “in range”. The RSSI value will be an average of the values of events received within a @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.SamplingInterval?text=SamplingInterval. If no events are received within @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.SamplingInterval?text=SamplingInterval, no event will be propagated. If @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeTimeout?text=OutOfRangeTimeout expires without any events or without any events with RSSI values greater than @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm, the events are considered “out of range” and an event with the last RSSI value received will be generated. If the last RSSI value was above @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm, it is set to -127 dBm.
Any<= @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.InRangeThresholdInDBm?text=InRangeThresholdInDBm >= 1>=25.5 (disabled)Will receive a RSSI event when the RSSI events are transitioning to "in range" from "out of range". If @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeTimeout?text=OutOfRangeTimeout expires without any events or without any events with RSSI values greater than @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm, the events are considered “out of range” and an event with the last RSSI value received will be generated. If the last RSSI value was above @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm, it is set to @Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter.OutOfRangeThresholdInDBm?text=OutOfRangeThresholdInDBm.

Constructors

BluetoothSignalStrengthFilter() BluetoothSignalStrengthFilter() BluetoothSignalStrengthFilter() BluetoothSignalStrengthFilter() BluetoothSignalStrengthFilter()

Create a new BluetoothSignalStrengthFilter object.

Properties

InRangeThresholdInDBm InRangeThresholdInDBm InRangeThresholdInDBm InRangeThresholdInDBm InRangeThresholdInDBm

The minimum received signal strength indicator (RSSI) value in dBm on which RSSI events will be propagated or considered in range if the previous events were considered out of range.

OutOfRangeThresholdInDBm OutOfRangeThresholdInDBm OutOfRangeThresholdInDBm OutOfRangeThresholdInDBm OutOfRangeThresholdInDBm

The minimum received signal strength indicator (RSSI) value in dBm on which RSSI events will be considered out of range.

OutOfRangeTimeout OutOfRangeTimeout OutOfRangeTimeout OutOfRangeTimeout OutOfRangeTimeout

The timeout for a received signal strength indicator (RSSI) event to be considered out of range.

SamplingInterval SamplingInterval SamplingInterval SamplingInterval SamplingInterval

The interval at which received signal strength indicator (RSSI) events are sampled.

See also