Supports only on some platforms.
Thus there are multiple reasons which this property can return the error value (i.e. Int32.MinValue).
- On an unsupported platform, e.g. MSFT+Win32, or MSFT+CE/WM on an older version. See below.
- The remote device is not turned-on or in range. See below.
- On Widcomm, there is no connection to the remote device. See below.
Platform support:
- Does not work on Win32 with the Microsoft Bluetooth stack. That platform provide no support for RSSI, please contact Microsoft to complain.
- Works on Windows Mobile 5.0, Windows Embedded CE 6.0, or later versions.
- Works on Widcomm, both platforms. We will not try to connect, see below.
Finally, to get an RSSI value Bluetooth requires an open connection to the peer device. On Widcomm we will not attempt to connect, so the caller must ensure that there's a connection -- perhaps it could call GetServiceRecords(Guid) just before accessing this property. On CE/WM if there is no active connection, then we will attempt to create one. This of course can be slow, and will be slow if the remote device is not in range. (Bluetooth 2.1 supports getting the RSSI value at discovery time which might provide the solution for many cases. However only the MSFT+Win32 stack specifically supports v2.1, and of course it doesn't support RSSI at all!)