[Zigbee] Problem with debugging in Zigbee Thread SDK 4.2.0

Hi everyone,

So I have using Zigbee and Thread SDK 4.2.0 for a while and I notice that some time there are some error like this

 <error> app: ZBOSS assertion in file: 105, line: 1101

or

 <error> app: ZBOSS assertion in file: 23, line: 105

Well, I tried to look for the error message "ZBOSS assertion in file:" to find clue on how to navigate to the file in zboss to debug. But I can not find any thing use full. So my question is how can I know what the number of each ZBOSS file. 

Please help and thank you,

Tu

Parents
  • Hello,

    I thought these were coming from the ZB_TRACE_FILE_ID in the zboss files, but it looks like that is not the case, unless you have added some files that weren't part of the SDK. Do you have any files that say

    #define ZB_TRACE_FILE_ID 23 or 105?

    I see that I am having trouble manually asserting in the first place. Can you try to set a breakpoint on line 151 in zb_nrf52_common.c, and check the call stack when the assert occurs?

    Best regards,

    Edvin

  • Hello,
    I have the same assert:
    ZBOSS assertion in file: 23, line: 105

    Is it possible to have some information about this, like some code lines and the condition which raise this assert ?

    Best regards,
    Jean-Philippe

  • Hello Jean-Philippe,

    Did you try to set a breakpoint where I mentioned in the other reply? Is it triggered?

    When did the issue start occuring? Did you do something with your project before this issue started to appear?

    Also, what SDK version are you using?

    BR,
    Edvin

  • Hello,

    Yes I have set a breakpoint on line 154, in assert_indication_cb.c, and yes it is triggered.
    I use nrf5 SDK v4.2.0 and is not possible for me to changed for nrfconnect.

    I don't known what appen precisely, but I notice this call stack:

    zb_apsde_data_acknowledged
    zb_af_handle_zcl_frame_data_confirm
    zb_buf_free_func
    zb_bufpool_storage_free
    zb_assert
    assert_indication_cb

    I have note also that (I'm not sure at 100%) but before assert, I have the current signal raised in zboss_signal_handler:
    Unimplemented signal (signal: 4, status: 0)

    Signal 4 is ZB_ZDO_SIGNAL_ERROR, is it possible that the 2 things have a link ?
    I have not found exemple about to how the signal ZB_ZDO_SIGNAL_ERROR shall be process, is it possible to have information about that ?

    Best regard,
    Jean-Philippe

Reply
  • Hello,

    Yes I have set a breakpoint on line 154, in assert_indication_cb.c, and yes it is triggered.
    I use nrf5 SDK v4.2.0 and is not possible for me to changed for nrfconnect.

    I don't known what appen precisely, but I notice this call stack:

    zb_apsde_data_acknowledged
    zb_af_handle_zcl_frame_data_confirm
    zb_buf_free_func
    zb_bufpool_storage_free
    zb_assert
    assert_indication_cb

    I have note also that (I'm not sure at 100%) but before assert, I have the current signal raised in zboss_signal_handler:
    Unimplemented signal (signal: 4, status: 0)

    Signal 4 is ZB_ZDO_SIGNAL_ERROR, is it possible that the 2 things have a link ?
    I have not found exemple about to how the signal ZB_ZDO_SIGNAL_ERROR shall be process, is it possible to have information about that ?

    Best regard,
    Jean-Philippe

Children
  • Well, for my case it looks like because of the zboss stack have some bug with assertion when we call zb API asynchronously, so what I do is just put the function which fail the assert into the zb app schedule and the problem is not happen again. Also you might want to check if you have somewhat heavy flash operation inside of your code because it may have something to do with the problem too. For me it is when the router device process a commission process

  • OK, about flash, normally no write access during the process when assert raised.
    About zb_app_schedule, I have not understand where, how and what you put in the app schedule.
    If you see my call stack, all the call is not my "resort".

  • so what I do is just put the function which fail the assert into the zb app schedule

    Well I just tried to trace as much as possible the API from Zboss that run when the error happen and then tried to encapsulate it to the Zboss app scheduler, you will find how and where to use it with the zigbee example like lightbulb and coordinator.

    Well but I do not know if it is going to work for everybody so you might have to try it yourself

    Best,

    Tu

  •  ,

    Is it possible for me to reproduce your assert on a DK without any external HW? If so, would it be possible to upload your project so that I can have a look? Please make sure that it compiles when unzipped in an unmodified SDK. 

    BR,

    Edvin

  • Well the problem only occur when I send a lot of report attribute to the coordinator (about 1 message/sec) and it will take some time for the problem to happen. The more devices I have (in my case 100) , the faster it happen (approximately in the first 100 times). 

    t possible for me to reproduce your assert on a DK without any external HW

    No, unfortunately,  I have another Wifi SoC as a gateway for the coordinator. The NRF52833 and this SoC connected through UART at 1Mbps. A message from UART will initiate an on/off command at the coordinator to the devices and then the device will report attribute back to the coordinator to be transfer back to the Wifi SoC. The code is confidential so I can not upload it to you. 

    Best regards,

    HNT

Related