BluetoothSignalStrengthFilter Class

Definition

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

public ref class BluetoothSignalStrengthFilter sealed
class BluetoothSignalStrengthFilter sealed
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BluetoothSignalStrengthFilter
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class BluetoothSignalStrengthFilter
function BluetoothSignalStrengthFilter()
Public NotInheritable Class BluetoothSignalStrengthFilter
Inheritance
BluetoothSignalStrengthFilter
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App 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()

Create a new BluetoothSignalStrengthFilter object.

Properties

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

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

OutOfRangeTimeout

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

SamplingInterval

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

Applies to

See also