LQI value in Xbee , How to get them?

I test send LQI request frame and can get LQI response frame
but I don’t know format description of byte LQI response.
Is the last byte of LQI response before checksum is LQI value ?

Ex LQI request frame ,I sent

7E 00 16 11 01 00 13 A2 00 40 5D 36 B4 FF FE 00 00 00 31 00 00 00 00 76 00 0D

EX. LQI response frame I get.

7E 00 2D 91 00 13 A2 00 40 5D 36 B7 36 2C 00 00 80 31 00 00 01 76 00 01 00 01 16 00 00 00 00 00 00 00 B4 36 5D 40 00 A2 13 00 00 00 04 02 00 FE 4D 7E 00 07 8B 01 36 2C 00 00 00 11

Red = Freame ACK send status
Blue = Is LQI value?

Thanks you.

LQI queries and responses are defined in the Zigbee Specification. However this might help:
http://ftp1.digi.com/support/images/APP_NOTE_XBee_ZigBee_Device_Profile.pdf

lookup the section on LQI responses (0x8031)

Does anyone know how to convert LQI to RSSI or distance(equation) in XBee ZB module .

Thanks

I am having two xbee pro series 2 nodes. I am not able to get lqi value of one node from other node I am sending the same one but I am getting the following 7E 00 07 8B 01 78 31 01 00 C9.

What kind of firmware is to be loaded to support api LQI . what are the steps when go ahead with XCTU

LQI works fine after programming the node with api firmware. Earlier i was having at firmware.

LQI works fine after programming the node with api firmware. Earlier i was having at firmware.

A quick note of warning.

I have been told by Digi Tech Support that the LQI data provide by this function is invalid – (wrong)

Apparently the problem is in the firmware provided to Digi by Ember - ember is working the problem.

thanks NATP. is there any other way to calculate LQI on our own

Hi all,

I have been told by Digi Tech Support that the LQI data provide by this function is invalid

Is it still true? I am also getting 0xFF for LQI all the time
Thanks
BR
Sam

Thanks NATP > If you have any ideas on the revised firmware edition . Please do convey us , Thanks

There are quite a bit of articles discussing the differences between RSSI and LQI, most of which explain that they two cannot be compared.

LQI information is in the Zigbee spec and can be obtained by using the ZDO, cluster 0x0031. Here’s a short python script which you can use to obtain LQI information from the ZDO:

from socket import *
import struct
import zigbee
import sys

sd = socket(AF_ZIGBEE, SOCK_DGRAM, XBS_PROT_APS)

bind to ZDO (endpoint 0)

sd.bind((“”, 0, 0, 0))

setting up the request

trans_id = 0
idx = 0
zdo_req = struct.pack(‘2B’, trans_id, idx)

send to ep 0, profile 0 and cluster 0x0031

edit ext address to match your device

d_addr = (‘00:13:a2:00:40:48:5a:1f!’, 0, 0, 0x0031)

try:
sd.sendto(zdo_req, 0, d_addr)
payload, src_addr = sd.recvfrom(128)
retlen = len(payload)
fmtstr = “%iB” % retlen
lqi_resp = struct.unpack(fmtstr, payload)
print "
lqi_resp: ", (lqi_resp)

except:
print "Exception: ", sys.exc_info()[1]

sd.close()

-NathanF

Hi All,
For your Information
I received this response from digi tech support today!

Thank you for contacting Digi. The LQI function of the XBee ZB firmware found within the Ember stack does not provided the proper information. Until this issue is resolved within the Ember stack, you will be unable to obtain different values from an LQI request. Sincerely, Eric Flanders Digi RF Technical Support