cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 scan Beacon tag and read RSSI

HPham.3
Associate II

I'm new to STM32WB and using BLE_MeshLightingPRFNode example.

With the function BLEMesh_CustomBeaconReceivedCallBack, I get the data and data is true but RSSI is wrong

How can I fix it or other way to get RSSI from beacon? Sorry for my bad english

Regard

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

3 is a weird value. How far is the device you are communicating with?

You could use the HCI_READ_RSSI function to get its value.

The ACI_HAL_READ_RAW_RSSI function is also possible but the raw value is not considering internal active elements that have an impact on the accuracy of this RSSI value.

Have a look at AN5270.

View solution in original post

8 REPLIES 8
Remi QUINTIN
ST Employee

The RSSI value is computed from power values measured at the RF input pin of the WB using also values from other internal active elements existing on the RX path (AGC, LNA, ...). This value is then inserted in the received advertising packet.

It is difficult to compare this value with one measured by an external beacon.

What makes you think the RSSI value is wrong?

value I get is always equal to 3 every time my bluetooth beacon moves

Is there other way to get value RSSI from beacon

Remi QUINTIN
ST Employee

3 is a weird value. How far is the device you are communicating with?

You could use the HCI_READ_RSSI function to get its value.

The ACI_HAL_READ_RAW_RSSI function is also possible but the raw value is not considering internal active elements that have an impact on the accuracy of this RSSI value.

Have a look at AN5270.

HPham.3
Associate II

0693W00000D0CPyQAN.pngIs my code OK

I don't understand about connection handle in function HCI_READ_RSSI

At least, I can get signal through my room about 20 meters

Remi QUINTIN
ST Employee

The connection handle is the handle used to identify the connection.

This connection handle is returned in the connection_complete_event once the connection is established.

Its structure is the following:

typedef PACKED(struct)

{

 uint8_t Status;

 uint16_t Connection_Handle;

 uint8_t Role;

 uint8_t Peer_Address_Type;

 uint8_t Peer_Address[6];

 uint16_t Conn_Interval;

 uint16_t Conn_Latency;

 uint16_t Supervision_Timeout;

 uint8_t Master_Clock_Accuracy;

} hci_le_connection_complete_event_rp0;

HPham.3
Associate II

At 0m, Tx power of my beacon is -24 dBm, but the value of function HCI_READ_RSSI is about 5 or 6, sometime it is 110