Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

zgp_init_by_scheduler not call at first startup of my device

Hello,

I have a project of a device with 2 endpoint plus the GP endpoint (242). It's a coordinator.

at first startup, the green power endpoint doesn't appear in the response of a node descriptor request.

if I reboot my device, the GP endpoint appear in the response of the node descriptor request.

I have found that during the first boot, the zgp_init_by_scheduler  function, from libgppb.a is not call.

Is someone have some information about what is wrong in my device please ?

Best regards,

Jean-Philippe

Parents Reply Children
  • This project was before with SDK v4.1.0 and the behaviour is not present with this version, it appear with the v4.2.0

    Best regard

  • Hi Jean-Philippe,

    I have been trying to reproduce your issue without any success. Can you try to collect some trace logs of when this happens, both first boot where zgp_init_by_scheduler is not called and when you reboot? You can see how to enable trace logs in the documentation here: Debug. The trace logs will be printed as regular logging, and the output will not make much sense, but I can send it to the Zigbee team for decoding.

    Best regards,

    Marte

  • Hi,

    I haven't collect your data for the moment.

    But what I found, that in you CLI example, 'zb_set_network_coordinator_role' or 'zb_set_network_router_role' are called before the first call to 'zboss_start_no_autostart', and so before the first call to 'zboss_main_loop_iteration'.

    In my device, 'zb_set_network_coordinator_role' or 'zb_set_network_router_role' are called after a push button event and then all BDB process, so after 'zboss_start_no_autostart', and so after one or many call to 'zboss_main_loop_iteration'.

    My supposition is that during the first call to 'zboss_main_loop_iteration', the stack need to know if the device is a router or coordinator, fixed by 'zb_set_network_coordinator_role' or 'zb_set_network_router_role' to initialise the Green Power endpoint, which is not the case in my device (But this work with SDK v4.1.0).

    see comment in 'zboss_api_af.h', ligne 576:
      @note Device has an additional Green Power endpoint if it is ZC or ZR
      and GPPB feature (Mandatory for Zigbee 3.0 ZC/ZR) is enabled.

    Can you confirm this please ?

    For a workaround, do you think it 's possible for me to call 'zb_set_network_coordinator_role'  before 'zboss_start_no_autostart', to fix the GP endpoint initialisation, and when my push button event occur, call again 'zb_set_network_coordinator_role' or 'zb_set_network_router_role' depending on the need, and after that, the BDB process ?

    Best regards,
    Jean-Philippe

  • Hi Jean-Philippe,

    This sounds like a possible reason. Is your device a GP Combo Basic device? One of the dependencies for this is that the device is not an end device (see CONFIG_ZIGBEE_GP_CB). So if that is the case it makes sense that it first checks whether the device is a router/coordinator before setting the GP end point as you are saying. However, I will have to check with the developers to confirm this for certain.

    I am not sure if that is a good workaround, as other parts will likely also be affected by which role you set before starting the stack, and thus you might get unexpected behavior if you try to switch to router afterwards. It would, however, be helpful if you could test with calling zb_set_network_coordinator_role or zb_set_network_router_role before zboss_start_no_autostart, just to verify whether this is the cause of the GP endpoint not being set or not.

    Best regards,

    Marte

  • Hi,

    Yes, my device is a GP Combo Basic device. And it's not an End device. It can be a ZC or a ZR, depending on event comes after the start.

    I have done the test with zb_set_network_coordinator_role or zb_set_network_router_role before zboss_start_no_autostart, and yes, with that, the endpoint appear after the first startup, without restart the device.

Related