Hi
I have a general question about how to sending command response. I setup a server OTA endpoint,
I receive the command but when sending the response it seams the client do not receive the response.
I have attached some sample code to illustrate what I am doing. I expect the next request
from the client to be a Image Block/Page request. But it keeps asking for the query next image.
Is there something basic that I am doing wrong ?
/Jimmy
if( hdr->is_common_command == 0 && hdr->cluster_id == ZB_ZCL_CLUSTER_ID_OTA_UPGRADE )
{
switch( hdr->cmd_id )
{
case ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_ID:
{
zb_zcl_parse_status_t status;
serial_query_next_cmd_t next_cmd;
//---
zb_zcl_ota_upgrade_query_next_image_res_t t;
zb_zcl_status_t x;
//---
memset(&next_cmd, 0, sizeof(serial_query_next_cmd_t));
ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ(&next_cmd.s, buf, status);
if (status == ZB_ZCL_PARSE_STATUS_SUCCESS)
{
zb_buf_t* obuf = zb_get_out_buf();
if (!obuf)
{
ZB_FREE_BUF_BY_REF(param);
return ZB_FALSE;
}
ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_RES( obuf,
hdr->addr_data.common_data.source.u.short_addr,
ZB_ZCL_ADDR_TYPE_SHORT,
hdr->addr_data.common_data.src_endpoint,
1,
hdr->profile_id,
hdr->seq_number,
ZB_ZCL_STATUS_SUCCESS,
next_cmd.s.manufacturer,
next_cmd.s.image_type,
0x12221572,
173638);