Table of Contents

Interface IBluetoothRssiToSignalStrengthConverter

Namespace
Bluetooth.Abstractions.Scanning.Converters
Assembly
Bluetooth.Abstractions.Scanning.dll

Converts RSSI (Received Signal Strength Indicator) values in dBm to normalized signal strength percentages.

public interface IBluetoothRssiToSignalStrengthConverter

Remarks

RSSI values typically range from -100 dBm (very weak signal) to -30 dBm (very strong signal). This converter normalizes these values to a 0.0-1.0 range for easier consumption by UI and business logic.

Default Implementation: The default LinearRssiToSignalStrengthConverter uses linear mapping with auto-scaling. It automatically expands its range based on observed min/max RSSI values during the session.

Available Implementations:

  • LinearRssiToSignalStrengthConverter (default): Auto-scaling linear mapping that adjusts range based on observed min/max values
  • FixedRangeLinearRssiToSignalStrengthConverter: Linear mapping with fixed min/max RSSI boundaries for consistent behavior
  • PiecewiseLinearRssiToSignalStrengthConverter: Non-linear mapping using different slopes for different RSSI ranges, better matching real-world signal behavior

Custom Curves: To use a different converter or implement custom curves (exponential, logarithmic, polynomial, etc.), register your implementation via dependency injection:

// Example: Use the piecewise linear converter (recommended for realistic signal quality)
services.AddSingleton<IBluetoothRssiToSignalStrengthConverter, PiecewiseLinearRssiToSignalStrengthConverter>();

// Example: Use fixed-range linear converter services.AddSingleton<IBluetoothRssiToSignalStrengthConverter, FixedRangeLinearRssiToSignalStrengthConverter>();

// Example: Register a custom exponential converter services.AddSingleton<IBluetoothRssiToSignalStrengthConverter, ExponentialRssiConverter>();

Note: This converter operates on smoothed RSSI values (after jitter smoothing configured via SignalStrengthSmoothingOptions). The smoothing happens before conversion.

Methods

Convert(double)

Converts the given RSSI value in dBm to a normalized signal strength percentage.

double Convert(double rssi)

Parameters

rssi double

The RSSI value in dBm (typically -100 to -30). This is usually a smoothed/averaged value rather than a raw reading.

Returns

double

A signal strength value between 0.0 (weakest) and 1.0 (strongest).