BluetoothSignalStrengthFilter Class

Definition

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

public ref class BluetoothSignalStrengthFilter sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BluetoothSignalStrengthFilter final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [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")]
class BluetoothSignalStrengthFilter final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[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.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
Object Platform::Object IInspectable BluetoothSignalStrengthFilter
Attributes

Windows 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:

InRangeThresholdInDBm OutOfRangeThresholdInDBm OutOfRangeTimeout SamplingInterval Behavior
Any <= InRangeThresholdInDBm >= 1 0 Will receive all RSSI events as they arrive as long as they are considered "in range". The events are considered "out of range" if OutOfRangeTimeout expires without any events or without any events with RSSI values greater than OutOfRangeThresholdInDBm. No additional events are generated when OutOfRangeTimeout expires.
Any <= InRangeThresholdInDBm >= 1 (0, 25.5) Will receive RSSI events on a regular interval defined by SamplingInterval as long as they are considered "in range". The RSSI value will be an average of the values of events received within a SamplingInterval. If no events are received within SamplingInterval, no event will be propagated. If OutOfRangeTimeout expires without any events or without any events with RSSI values greater than 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 OutOfRangeThresholdInDBm, it is set to -127 dBm.
Any <= InRangeThresholdInDBm >= 1 >=25.5 (disabled) Will receive a RSSI event when the RSSI events are transitioning to "in range" from "out of range". If OutOfRangeTimeout expires without any events or without any events with RSSI values greater than 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 OutOfRangeThresholdInDBm, it is set to 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