|
Myriota Flex SDK 2.6.0
|
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) |
Functions to support testing the RSSI of the FlexSense.
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
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.
| bool FLEX_RSSICalcSupport | ( | void | ) |
Reports whether the user application was compiled with the option -Drssi_calc_support=true.
| 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.
| start_delay_ms | The 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_hz | The frequency, in hertz, at which to test for RSSI. This should almost always be set to FLEX_RSSI_DEFAULT_FREQUENCY_HZ. |
| samples_count | The total number of RSSI samples to be read. |
| read_interval_ms | The delay, in milliseconds, between each consecutive RSSI reading. |
| should_log | A boolean flag indicating whether the RSSI readings should be logged. The logs are viewable in the DeviceAssist logs window. |
| 0 | This most likely indicates that application was not built with -Drssi_calc_support=true. You should check the result of bool FLEX_RSSICalcSupport(void) |
| < -99 | Indicates a "good" noise level |
| -99 to -95 | Indicates a "acceptable" noise level |
| >= -94 | Indicates a "poor" noise level |