Zigee increase auto-bind range #10399

This commit is contained in:
Stephan Hadinger 2021-08-22 22:44:21 +02:00
parent 5eb1ab0ab4
commit db7ee8424e
2 changed files with 3 additions and 1 deletions

View File

@ -856,6 +856,8 @@
// Auto-binding constants, see `Z_autoAttributeReporting`
#define USE_ZIGBEE_AUTOBIND_MAX_ENDPOINTS 8 // max number of endpoint receiving auto-bind requests
#define USE_ZIGBEE_AUTOBIND_MAX_CLUSTER 0x10 // max endpoint number (excluded receiving auto-bind requests)
// Below are the threshold for attribute reporting
#define USE_ZIGBEE_AUTOBIND_BATTVOLTAGE 0.2 // V
#define USE_ZIGBEE_AUTOBIND_BATTPERCENT 5 // %

View File

@ -638,7 +638,7 @@ int32_t Z_ReceiveActiveEp(int32_t res, const SBuffer &buf) {
for (uint32_t i = 0; i < activeEpCount; i++) {
uint8_t ep = activeEpList[i];
zigbee_devices.getShortAddr(nwkAddr).addEndpoint(ep);
if ((i < 4) && (ep < 0x10)) {
if ((i < USE_ZIGBEE_AUTOBIND_MAX_ENDPOINTS) && (ep < USE_ZIGBEE_AUTOBIND_MAX_CLUSTER)) {
zigbee_devices.queueTimer(nwkAddr, 0 /* groupaddr */, 1500, ep /* fake cluster as ep */, ep, Z_CAT_EP_DESC, 0 /* value */, &Z_SendSimpleDescReq);
}
}