Skip to main content
Associate III
April 4, 2024
Solved

In Bluetooth p2pSever,How to get RSSI Value from connected p2pClient in STM32WB5MMG?

  • April 4, 2024
  • 5 replies
  • 2058 views

 I want to get RSSI value of connected p2p Clients to p2p Server and can i able to get multiple connection of p2p clients RSSI value.

The  main objective is get Client's exact distance from p2p server using RSSI.

This topic has been closed for replies.
Best answer by STTwo-32

Hello @Kavinraj 

The RSSI is part of the advertising packet received from the BLE stack. The RSSI is the Tx Power level. You can check the AD type and the RSSI value is the data next to it. You can also read this information using the command HCI_READ_RSSI.

STTwo32_0-1712238116490.pngSTTwo32_1-1712238146455.jpeg

Best Regards.

STTwo-32

5 replies

STTwo-32
STTwo-32Best answer
ST Technical Moderator
April 4, 2024

Hello @Kavinraj 

The RSSI is part of the advertising packet received from the BLE stack. The RSSI is the Tx Power level. You can check the AD type and the RSSI value is the data next to it. You can also read this information using the command HCI_READ_RSSI.

STTwo32_0-1712238116490.pngSTTwo32_1-1712238146455.jpeg

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
KavinrajAuthor
Associate III
April 15, 2024

Hello @STTwo-32 ,

     I want to get distance of BLE Slave devices(CLIENT) using RSSI value. In this case i have doubt about to use STM32 Master as a BLE Server or BLE Beacon.

Here attaching sample model of our project objective.

Kavinraj_0-1713166688341.png

 

   

STTwo-32
ST Technical Moderator
May 20, 2024

Hello @Kavinraj 

The RSSI is a parameter that may help you to estimate the distance. But, On BLE Technologie you need to have a direct Line of site to have a good estimation of the distance. I suggest you measure different distance and collect the RSSI of each distance then you can create a mathematical equation that receive the RSSI as input and calculate the distance. Then, using the triangulation Methode (3 node fixe), you can estimate the exact location of each node. The Serial Trace need to be implemented to visualize the data.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
KavinrajAuthor
Associate III
May 21, 2024

Hello @STTwo-32 

            I have too much oscillation in RSSI value even the target ble is placed fixed distance. How to reduce oscillation in RSSI value?

           I m Currently using The formula for RSSI value to Distance,    

           Distance(m) =  pow( 10 , (Rssi of 1meter distance -  obtained RSSI) /20  ) ; 

          I read rssi value  in  every 50ms once, after taking average of 20 times then its converted  into distance.

Can you suggest me to right way get it and if  I'm doing wrong kindly guide me.

 

 

 

STTwo-32
ST Technical Moderator
May 28, 2024

The BLE Technologie is not the best for distance estimation or measurement since the RSSI value is based on a signal that get impacted by any type of interference. So, we don't have a specific way to do that since this implementation is done by searchers and not and industrial application. We didn't test this application before.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.