1 Reply Latest reply on Jan 29, 2018 7:25 AM by e.pratt_1639216

    CyBle_GetRssi() != scanReport->rssi ?



      How do I get the RSSI of a peered device? Say I'm connected to a peripheral and want to know the RSSI from the Central.


      Also whats wrong with this function CyBle_GetRssi(), I'm trying to output an RSSI but gives a postive value and a dBm value lower than -85 e.g. -120, when the documentation say it will only output a dBm range of -5 to -85 dBm, and this is true though for using scanReport->rssi.

      Im printing it using:


      printf("RSSI: %d", CyBle_GetRssi());

        • 1. Re: CyBle_GetRssi() != scanReport->rssi ?

          According to the documentation associated with the function, it reads the RSSI of the last successfully received packet; Thus, if there is no successfully received packet, it may be returning -120 as an error/uninitialized?


          The RSSI from the scanReport is the direct access to the value, so using that should be fine in lieu of the function not working correctly.

          Listed under the BLE_StackGap.h file at line 1049, it says:

          /** Rssi of the responding device.

               * Range: -127 <= N <= +20

               * Units: dBm

               * N = 127 -> RSSI not available


              int8                        rssi;

          Thus, it may be listing the incorrect values when you call the function due to not being available while not connected/scanning devices? There is most likely a requirement such as being connected, actively scanning, or calling it when you receive an advertisement packet...