Issue #303 has been reported by Philipp Buluschek.
----------------------------------------
Bug #303: LQINetworkBrowserThread misses devices
http://zb4o.aaloa.org/redmine/issues/303
Author: Philipp Buluschek
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Has a patch: No
Has license agreement signed: No
In @LQINetworkBrowserThread@, to get the full list of neighbors from a device,
several requests may be necessary. This is done through recursion with the
following code:
<pre>
private List<NetworkAddressNodeItem> lqiRequestToNode(NetworkAddressNodeItem
node, int index){
...
if ( lqi_resp.getNeighborLQIEntries() > ( lqi_resp.getNeighborLQICount() +
index + 1 ) ) {
lqiRequestToNode( node, lqi_resp.getNeighborLQICount() + index + 1 );
}
}
</pre>
But these boundaries are wrong. Suppose you have 4 entries in total (with
indexes 0,1,2,3), and you get 3 in return in the first request. This means you
should make an additional request to get the last one, with a start index of 3.
The above code doesn't do this. The correct code is instead:
<pre>
// 4 > 3 + 0
// OK, do an additional request
if ( lqi_resp.getNeighborLQIEntries() > ( lqi_resp.getNeighborLQICount() +
index) ) {
// 3 + 0 // do it with
start index 3
lqiRequestToNode( node, lqi_resp.getNeighborLQICount() + index);
}
</pre>
--
DO NOT ANSWER TO THIS E-MAIL ADDRESS, NO ONE WILL READ IT. PLEASE WRITE TO
[email protected]
ZigBee 4 OSGi - Redmine E-Mail Notificatioon
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://zb4o.aaloa.org/redmine
_______________________________________________
Dev mailing list
[email protected]
http://zb4osgi.aaloa.org/mailman/listinfo/dev