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

ZIGBEE SDK ZB_GET_OUT_BUF_DELAYED2 call failed

HI,all

I am a newman for zigbee on NRF52840 with S140 softdevice,

I have two board, one is ZC and another is ZED.

On ZC board, I use ZB_GET_OUT_BUF_DELAYED2 to send data to ZED continuely,about 100 times this method return failed and can not alloc a buf.

after about 3 seconds ZB_GET_OUT_BUF_DELAYED2 can be called successfully.

My question is:

1,when ZB_GET_OUT_BUF_DELAYED2 call failed, is there any method to relase or remalloc buffer?

2,how to reduce the time(about 3 seconds) to get new buf successfully?

3,why need wait for some seconds to get new buf?

wish your help,thanks.

  • Hi.

    If you look at the file components\zigbee\cli\zigbee_cli_cmd_generic_cmd.c

    Can you change:

    ZB_ZCL_PACKET_PUT_DATA_N(ptr, cmd_data, cmd_size); \

    To:

    /* Scan argument with payload and put in buffer with command to send */
    for (zb_uint8_t i = 0; i < p_cmd_query->payload_length; i++)
    {
    ZB_ZCL_PACKET_PUT_DATA8(ptr, (p_cmd_query->payload[i]));
    }

    If you want to disable acknowledgement, please remove:

    ZB_ZCL_FINISH_PACKET(buffer, ptr) \

     

    Add this define at the top.:

    #define ZB_ZCL_FINISH_PACKET_NO_APS_ACK(zbbuf, ptr) (void) zb_zcl_finish_and_send_packet_no_ack((zbbuf), (ptr),

    And change:

    ZB_ZCL_FINISH_PACKET(buffer, ptr) \

    to

    ZB_ZCL_FINISH_PACKET_NO_APS_ACK(zbbuf, ptr) \

    Best regards,

    Andreas

Related