Bug #265

Binding disalignment must be handled correctly

Added by Philipp Buluschek almost 4 years ago. Updated over 3 years ago.

Status:Closed Start date:10/23/2014
Priority:Normal Due date:
Assignee:Stefano Lenzi % Done:

0%

Category:zigbee.basedriver Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.basedriver-0.8.0
Has a patch:No Has license agreement signed:No

Description

In ZigBeeDeviceImpl.unbind(int clusterId), the unbind response of the device may be that no binding exists (if the zb4o and the device got disaligned - which happens if for example you reset the device).

This response has code 0x88, so the check should read:

  public boolean unbind(int clusterId) throws ZigBeeBasedriverException {
    ...
    if( response == null || (response.Status != 0 && response.Status != 0x88) ){ // 0x88 - device says it has no binding, so remove it locally
    ...

If such disalignment case happens, ZB4O thinks the binding exists so it will not renew the binding on a call to ZigBeeDeviceImpl.bind(). This is bad, as in reality the binding does not exist, and it is impossible to tell ZB4O to redo it. I'm not sure how this can be fixed. This should probably be a different bug...

Associated revisions

Revision 1078
Added by Stefano Lenzi almost 4 years ago

Fixed typo in log messages ( refs #265 )

Revision 1079
Added by Stefano Lenzi almost 4 years ago

Added a workaround to fix base driver misaligment of binding table ( refs #265 )

Revision 1102
Added by Stefano Lenzi almost 4 years ago

Added some comment describing scenario when binding status get corrupted ( refs #265 )

History

#1 Updated by Stefano Lenzi almost 4 years ago

  • Category set to zigbee.basedriver
  • Status changed from New to In Progress
  • Assignee set to Stefano Lenzi
  • Target version set to org.aaloa.zb4osgi.zigbee.basedriver-0.8.0
Yes your approch is a good a idea for restoring the actual status of the device.
Another two points that we are missing are:
  1. persistance between reboot of the ZB4O stack so that it remember the bound devices
  2. we should also rely on ZigBee command for getting the active binding of each device

#2 Updated by Stefano Lenzi almost 4 years ago

  • Status changed from In Progress to Resolved

I have modified the codebase as you suggested. Please close the ticket if it is enough for you.

#3 Updated by Stefano Lenzi over 3 years ago

  • Status changed from Resolved to Closed

Closing the issue

Also available in: Atom PDF