Myriota Flex SDK 2.6.0
Loading...
Searching...
No Matches
RSSI testing

Functions to support testing the RSSI of the FlexSense. More...

Macros

#define FLEX_RSSI_DEFAULT_FREQUENCY_HZ   400500000
 The default frequency, in Hertz, used for executing the RSSI test.
 

Functions

bool FLEX_RSSICalcSupport (void)
 
int32_t FLEX_RSSIAvgCalcRun (const uint32_t start_delay_ms, const uint32_t frequency_hz, const uint32_t samples_count, const uint32_t read_interval_ms, const bool should_log)
 

Detailed Description

Functions to support testing the RSSI of the FlexSense.

RSSI testing

The FlexSense Received Signal Strength Indicator (RSSI) testing functions are disabled by default. To enable them, you must include the flag -Drssi_calc_support=true when building. The complete meson command for setup will look like this:

meson setup –crossfile flex-crossfile.ini -Drssi_calc_support=true build

Impacts of Enabling RSSI Testing

Important Note on Accuracy

Be aware that BLE advertising will cause inaccurate RSSI readings. It is critical to design your applications to minimize or avoid concurrent BLE advertising during RSSI measurements.

Function Documentation

◆ FLEX_RSSICalcSupport()

bool FLEX_RSSICalcSupport ( void )

Reports whether the user application was compiled with the option -Drssi_calc_support=true.

◆ FLEX_RSSIAvgCalcRun()

int32_t FLEX_RSSIAvgCalcRun ( const uint32_t start_delay_ms,
const uint32_t frequency_hz,
const uint32_t samples_count,
const uint32_t read_interval_ms,
const bool should_log )

This function performs a series of Received Signal Strength Indicator (RSSI) readings and returns their average.

Parameters
start_delay_msThe time, in milliseconds, to wait before the first reading. This delay can help prevent inaccurate measurements caused by the proximity of the tester's body to the device before testing begins.
frequency_hzThe frequency, in hertz, at which to test for RSSI. This should almost always be set to FLEX_RSSI_DEFAULT_FREQUENCY_HZ.
samples_countThe total number of RSSI samples to be read.
read_interval_msThe delay, in milliseconds, between each consecutive RSSI reading.
should_logA boolean flag indicating whether the RSSI readings should be logged. The logs are viewable in the DeviceAssist logs window.
Returns
The cacluated RSSI average
Return values
0This most likely indicates that application was not built with -Drssi_calc_support=true. You should check the result of bool FLEX_RSSICalcSupport(void)
< -99Indicates a "good" noise level
-99 to -95Indicates a "acceptable" noise level
>= -94Indicates a "poor" noise level