-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
Answers checklist.
- I have read the documentation ESP Zigbee SDK Programming Guide and tried the debugging tips, the issue is not addressed there.
- I have updated ESP Zigbee libs (esp-zboss-lib and esp-zigbee-lib) to the latest version, with corresponding IDF version, and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
5.1.3
esp-zigbee-lib version.
1.2.3
esp-zboss-lib version.
1.2.3
Espressif SoC revision.
ESP32-H2 & ESP32-C6
What is the expected behavior?
the expected behavior is for both commands to work as they should
What is the actual behavior?
there are 2 different problems
- binding error
In this case the error is found when performing the binding, the method correctly calls the command and the callcack is also called, but it responds with an error message 133 corresponding to a timeout, this error occurs quite often but not always
Below is an excerpt of the implemented code
void zigbeeDeviceBindReq(uint16_t rid,esp_zb_ieee_addr_t src_addr,esp_zb_ieee_addr_t des_addr,uint16_t cluster_id,uint8_t src_ep,uint8_t des_ep){
esp_zb_zdo_bind_req_param_t bind_req;
uint16_t *user_rid = malloc(sizeof(uint16_t));
*user_rid=rid;
bind_req.cluster_id=cluster_id;
bind_req.dst_addr_mode=ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT;
memcpy(bind_req.src_address,src_addr,sizeof(esp_zb_ieee_addr_t));
memcpy(bind_req.dst_address_u.addr_long,des_addr,sizeof(esp_zb_ieee_addr_t));
bind_req.dst_endp=des_ep;
bind_req.src_endp=src_ep;
bind_req.req_dst_addr=esp_zb_address_short_by_ieee(src_addr);
esp_zb_zdo_device_bind_req(&bind_req, bind_cb, (void *)user_rid);
}
static void bind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx)
{
ESP_LOGE("ZIGBEE","CALLBACK BIND");
free(user_ctx);
}
- unbinding error
On the other hand, this error corresponds to unbind . and there is no response when calling it, not only that but I placed a log inside the unbind callback and it is never called
Below is an excerpt of the implemented code
void zigbeeDeviceUnbindReq(uint16_t rid,esp_zb_ieee_addr_t src_addr,esp_zb_ieee_addr_t des_addr,uint16_t cluster_id,uint8_t src_ep,uint8_t des_ep){
esp_zb_zdo_bind_req_param_t bind_req;
uint16_t *user_rid = malloc(sizeof(uint16_t));
*user_rid=rid;
bind_req.cluster_id=cluster_id;
bind_req.dst_addr_mode=ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT;
memcpy(bind_req.src_address,src_addr,sizeof(esp_zb_ieee_addr_t));
memcpy(bind_req.dst_address_u.addr_long,des_addr,sizeof(esp_zb_ieee_addr_t));
bind_req.dst_endp=des_ep;
bind_req.src_endp=src_ep;
bind_req.req_dst_addr=esp_zb_address_short_by_ieee(src_addr);
esp_zb_zdo_device_unbind_req(&bind_req, unbind_cb, (void *)user_rid);
}
static void unbind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx)
{
ESP_LOGE("ZIGBEE","CALLBACK UNBIND");
free(user_ctx);
}
Steps to reproduce.
perform binding and unbindings
More Information.
No response