cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

Hi,

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());

0 Likes
1 Solution
Anonymous
Not applicable

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...

View solution in original post

6 Replies
Anonymous
Not applicable

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...

View solution in original post

Anonymous
Not applicable

When I'm connected to a peer device, is it the one I'm getting the RSSI on? Using the scanReport->rssi?

Anonymous
Not applicable

The RSSI value will be associated with the currently connected device, so yes.

Anonymous
Not applicable

By Using the CyBle_GetRssi(), Is there a way to determine if packet received is not an error packet.

0 Likes
Anonymous
Not applicable

Based on the RSSI alone? No. The RSSI is merely a "signal strength" value, that is associated (roughly due to wireless interference) with distance and antenna power/gain. It's like a "volume level", but for wireless packets received to tell you how "loud" the wireless signal was. This doesn't correlate with the type of packet as far as I know.

You should be able to handle the HCI errors and the Link Layer errors through the API associated with the BLE module. (Right-click on the BLE module in topdesign.cysch and select "Open API Documentation", and look for HCI and Link Layer interactions)

I don't know for sure if you will be able to interact with the error packets for the lowest level communications over BLE, but you should be able to get pretty close from what I've seen.

Anonymous
Not applicable

Thank you for the replies!