This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[ZIGBEE] SLEEPY ZED TIMER BEHAVIOR

SDK: 4.1.0

CHIP: 52840

old question

Hi, I have developed sleepy zed.

I have success to send "request data" in every 5 sec.

I wants to add regular job which is send set attribute ias zone state in every 5 minutes.

 

static void zigbee_timer_handler(void * p_context)
{
    // DEBUG_FUNC();
    m_timer_s += ZIGBEE_TIMER_SEC;
    if (m_timer_s >= ZIGBEE_ATTR_TIMEOUT) {
        m_timer_s = 0;
        zb_ret_t zb_err_code;
        zb_err_code = ZB_SCHEDULE_APP_CALLBACK(
            send_ias_zone_audit_status_msg, 
            0);
        ZB_ERROR_CHECK(zb_err_code);
    }
}

void send_ias_zone_audit_status_msg(uint8_t param)
{
    uint16_t ias_zone_status;
    ias_zone_status = ... ;
    _send_ias_zone_audit_status_msg(ias_zone_status);
}

void _send_ias_zone_audit_status_msg(uint16_t ias_zone_status)
{
    zb_bool_t ret = false;
    zb_bufid_t buf_id = zb_buf_get_out();
    
    ret = zb_zcl_ias_zone_set_status(DOOR_LOCK_ENDPOINT,
                                    (zb_uint16_t) ias_zone_status,
                                    0,
                                    buf_id);
}

Adding this code makes the zed timer behave weird.

It works in the beginning. but After a few minutes, zed doesn't send data request. and doesn't wake regularly.

After a few minutes, zed send out multiple data request packets. 

and finally, It never send data request packet.

In this condition, zb_zcl_ias_zone_set_status always returns false.

How can I fix this?

The zigbee stack is too hard to be developed. 

I'm not using FreeRTOS. the behavior is very similar with link.

Parents
  • Hi,

    The payload of the packets in the sniffer log you attached are encrypted, so I'm unable to decipher them. In order to avoid this, you should start the sniffer log before the network is formed. Wireshark will then automatically decode the packets after the joining process is completed. If this isn't possible, could you please share the network key?

    Best regards,

    Marte

Reply
  • Hi,

    The payload of the packets in the sniffer log you attached are encrypted, so I'm unable to decipher them. In order to avoid this, you should start the sniffer log before the network is formed. Wireshark will then automatically decode the packets after the joining process is completed. If this isn't possible, could you please share the network key?

    Best regards,

    Marte

Children
No Data
Related