| Solution Details |
|---|
|
How are the LQI and MSQ values for received data packets calculated?
The LQI value generated whenever a data frame is received is based upon the signal strength. The JN5121 and JN5139 devices determine the signal strength by reading the amount of gain the modem is using to receive the frame. The modem gain can be adjusted from 0 to 47 (0 indicates that the signal strength is high as no gain is required).
The MAC layer software then takes this gain setting and converts it into an LQI value of between 0 and 255 (255 indicating the highest link quality). It must be noted that although the LQI value being reported may be very low this does not mean that the device will not be able to receive frames reliably. It is simply indicating that the modem gain has been set to its highest level in order to receive the frame. It is quite possible to have a relatively low LQI value and only fail to receive a small percentage of frames.
The JN5139 has another signal quality metric called Modem Signal Quality (MSQ) which is calculated on the basis of the correlation result between the received signal and the IEEE802.15.4 spreading codes. MSQ is stored as a variable in the stack and is available to an application.
Using an audio analogy, LQI (and ED) reflects the loudness of the received signal and MSQ reflects the distortion.