How do I obtain LQI and RSSI values from the stack? What do the results mean?
The EmberZNet and EZSP interfaces provide per-packet RSSI (receiver signal strength indicatin) and LQI (link quality index) information, which are often useful for quality-of-service measurements or location approximation algorithms; but how is this information exposed in the API and how should the results be interpreted?
The EmberZNet stack API provides the emberGetLastHopRssi() and emberGetLastHopLqi() function calls, which can be called within the context of the emberIncomingMessageHandler() and emberIncomingBootloadMessageHandler() to obtain RSSI and LQI information respectively for the delivery of the current packet across the last hop of the incoming route. The EZSP interface for the EFR32 provides the lastHopRssi and lastHopLqi values as part of the incomingMessageHandler transaction (ID=0x0045) to expose this data for the current packet.
Since RSSI information does not pertain to any specific link with another device, it can also be assessed outside of the incoming message handler context. This is done using the emberStartScan() API call and EZSP transaction, which supports the EMBER_ENERGY_SCAN scan type for RSSI energy level assessments. This allows the user to define the scan duration over which the peak energy level should be reported. The RSSI from the energy scan can be get in the emberEnergyScanResultHandler().
Regarding the explanation of the LQI and RSSI, please refer to the KBA LQI in Silicon Labs EM3xx and EFR32 Parts.
Regarding the RSSI in emberEnergyScanResultHandler() and emberGetLastHopRssi(), please refer to the KBA What do the RSSI values mean in emberEnergyScanResultHandler() & emberGetLastHopRssi()?