<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to Retrieve LQI for End Devices Connected via a Router in a Zigbee Network?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116816/how-to-retrieve-lqi-for-end-devices-connected-via-a-router-in-a-zigbee-network</link><description>I am using three devices in my Zigbee network: 
 A Coordinator. A Router. An End Device. When I retrieve the LQI data: 
 If both the Router and End Device connect directly to the Coordinator, I get the correct LQI values for all devices. However, if the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2024 21:16:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116816/how-to-retrieve-lqi-for-end-devices-connected-via-a-router-in-a-zigbee-network" /><item><title>RE: How to Retrieve LQI for End Devices Connected via a Router in a Zigbee Network?</title><link>https://devzone.nordicsemi.com/thread/513307?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 21:16:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c154873-89ae-458f-b755-36d62fd4648f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So from your coordinator&amp;#39;s application, you should do something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void read_lqi_request()
{
zb_bufid_t buf = zb_buf_get_out();
zb_zdo_mgmt_lqi_param_t *req_param = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_lqi_param_t);

req_param-&amp;gt;start_index = 0;
req_param-&amp;gt;dst_addr = &amp;lt;ADDRESS&amp;gt;; // End device&amp;#39;s short address. &amp;lt;--- This line

zb_uint8_t tsn = zb_zdo_mgmt_lqi_req(buf, get_lqi_cb);

if (tsn == RET_OK)
{
TRACE_MSG(TRACE_APS1, &amp;quot;LQI request sent successfully&amp;quot;, (FMT__0));
}
else
{
TRACE_MSG(TRACE_ERROR, &amp;quot;Failed to send LQI request&amp;quot;, (FMT__0));
}
}

void get_lqi_cb(zb_uint8_t param)
{
zb_bufid_t buf = param;
zb_uint8_t *zdp_cmd = zb_buf_begin(buf);
zb_zdo_mgmt_lqi_resp_t *resp = (zb_zdo_mgmt_lqi_resp_t *)(zdp_cmd);
zb_zdo_neighbor_table_record_t *record = (zb_zdo_neighbor_table_record_t *)(resp + 1);
zb_uint_t i;

printf(&amp;quot;LQI Callback: status=%d, neighbor_table_entries=%d, start_index=%d, neighbor_table_list_count=%d\n&amp;quot;,
resp-&amp;gt;status, resp-&amp;gt;neighbor_table_entries, resp-&amp;gt;start_index, resp-&amp;gt;neighbor_table_list_count);

for (i = 0; i &amp;lt; resp-&amp;gt;neighbor_table_list_count; i++)
{
printf(&amp;quot;Network Addr=%d, Dev Type=%d, RxOnWhenIdle=%d, Relationship=%d, PermitJoin=%d, Depth=%d, LQI=%d\n&amp;quot;,
record-&amp;gt;network_addr,
ZB_ZDO_RECORD_GET_DEVICE_TYPE(record-&amp;gt;type_flags),
ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE(record-&amp;gt;type_flags),
ZB_ZDO_RECORD_GET_RELATIONSHIP(record-&amp;gt;type_flags),
record-&amp;gt;permit_join, record-&amp;gt;depth, record-&amp;gt;lqi);

record++;
}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is your own implementation, but you need to call it from the coordinator, and use the end device&amp;#39;s address as the destination address.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Retrieve LQI for End Devices Connected via a Router in a Zigbee Network?</title><link>https://devzone.nordicsemi.com/thread/512727?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 11:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe1ecaee-bb84-48ce-9bd6-35dc66a5b2a6</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I want to receive end device LQI using coordinator even if the end device is connected through router&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Retrieve LQI for End Devices Connected via a Router in a Zigbee Network?</title><link>https://devzone.nordicsemi.com/thread/512646?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 21:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1203f819-1e08-4982-aada-2f386ba215b8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like you are trying to get the LQI of the coordinator from the end device? Are you sure you don&amp;#39;t want to do it the other way around? The end device is not aware of the different nodes in the network, other than it&amp;#39;s parent, if it is not a router itself. So I believe you should try to measure the LQI of the end device from the coordinator.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>