From 8b3d6dd4e72f8d5a98055756eac6f2a3212ad453 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 24 Nov 2023 09:21:12 +0100 Subject: BTDevice: API Doc: Detail RSSI and Tx Power Level --- api/direct_bt/BTDevice.hpp | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/direct_bt/BTDevice.hpp b/api/direct_bt/BTDevice.hpp index c42a8b88..0d8c52c1 100644 --- a/api/direct_bt/BTDevice.hpp +++ b/api/direct_bt/BTDevice.hpp @@ -398,10 +398,41 @@ namespace direct_bt { */ BDAddressAndType const & getVisibleAddressAndType() const noexcept { return visibleAddressAndType; } - /** Return RSSI of device as recognized at discovery and connect. */ + /** + * Returns Received Signal Strength Indicator (RSSI) + * in dBm with ±6 dB accuracy of device as recognized at discovery and connect. + *

+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.5.4 Read RSSI command + *

+ *

+ * Any positive RSSI value indicates how many dB the RSSI is above the upper limit, + * any negative value indicates how many dB the RSSI is below the lower limit. + * The value zero indicates that the RSSI is inside the Golden Receive Power Range. + *

+ *

+ * LE range [-127..20] with 0 inside the Golden Receive Power Range + * and 127 as "not available" value (core spec). + *

+ *
+             * pathloss = Tx Power Level – RSSI
+             * 
+ * @see #getTxPower() + */ int8_t getRSSI() const noexcept { return rssi; } - /** Return Tx Power of device as recognized at discovery and connect. */ + /** + * Return Tx Power Level in dBm with ±6 dB accuracy of device as recognized at discovery and connect. + *

+ * Core Specification Supplement, Part A, Section 1.5. + *

+ *

+ * Range [-127..20] with 127 as "not available" value (core spec). + *

+ *
+             * pathloss = Tx Power Level – RSSI
+             * 
+ * @see #getRSSI() + */ int8_t getTxPower() const noexcept { return tx_power; } /** -- cgit v1.2.3