This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIDC-CC2650STK-SENSORTAG: How to configure the timeouts and retries parameters for reconnection (rejoin) - Z-Stack_Home_1.2.2a

Part Number: TIDC-CC2650STK-SENSORTAG

Hi everyone, my goal is the following:

my Zigbee network consists of a coordinator and some sensor nodes. If during normal operation the coordinator (ZC) loses power supply (coordinator not available) the sensor nodes will start looking for it to reconnect/rejoining...this consumes the battery on board (red LED1 always blinking).

How can this be avoided by appropriately setting some specific parameters (timeouts and / or number of times retry to reconnection, or or something else) or if it can be sufficient to disable the lighting of LED1?

What do you advise me to do?

Thanks

  • Hi filippo,

    You can modify f8wconfig definitions and ZDApp functionality to fit your needs, please refer to similar E2E threads.

    Regards,
    Ryan

  • Hi Ryan, I try and update you.

    Thanks

  • Basically, you just need to revise the following two parameters in f8wconfig.cfg.

    /* Rejoin retry backoff silent period timer duration in milliseconds

    -DREJOIN_BACKOFF=900000

    /* Rejoin retry backoff scan timer duration in milliseconds

    -DREJOIN_SCAN=900000

  • Ok these parameters should mean that:
    when the device loses the parent, it will make beacon requests for REJOIN_SCAN milliseconds and stop for REJOIN_BACKOFF milliseconds.

    In my code I changed it like this:

    /* Rejoin retry backoff silent period timer duration in milliseconds - default 15 minutes according to HA test spec */
    -DREJOIN_BACKOFF=900000
    
    /* Rejoin retry backoff scan timer duration in milliseconds - default 15 minutes according to HA test spec */
    -DREJOIN_SCAN=60000

    DREJOIN_BACKOFF --> 15 minutes

    DREJOIN_SCAN --> 1 minute

    but it does not work! The device continues to blink (red) looking for a coordinator...

    Do I need to change any precompiler configuration (ZStackCore - End Device -> Options / C / C ++ compiler / Preprocessor / Defined Symbols)?

    Thanks

  • Make sure to clean your code before rebuilding the application code and refer to relevant E2E threads.

    Regards,
    Ryan

  • Yes Ryan I tried to clean ZStackCore-EndDevice and SensorTag but it doesn't work!

    Maybe it's not enough to just change these parameters...but do you need to change the code?

    Thanks

  • You should debug ZDApp.c to further understand the device state and make modifications (ex. disable LED operation) as necessary for your application.

    Regards,
    Ryan

  • Hi to everyone and thanks Ryan and YK for your advise,

    debugging ZDAPP.c and sensortagapp.c I realized that the status of LED1 (red) simply means:

    • NODE is associated (led1 off)
    • NODE not associated (led1 in blinking)

    and it does not depend on the state of the node in REJOIN_SCAN and REJOIN_BACKOFF.

    I tried to change the values to DREJOIN_BACKOFF and DREJOIN_SCAN in f8wConfig.cfg (for example 60000 = 1minute) and it works.

    Instead for now in sensortagapp.c I changed:

    Board_Led_control (board_led_type_LED1, board_led_state_BLINKING);

    with

    Board_Led_control (board_led_type_LED1, board_led_state_BLINK);

    this does not drain the battery too much!

    Thanks!

  • Hi to everyone,

    I've another question/doubt:

    When my end-device is configured without AUTO-BIND or the UNBIND command has been successfully sent from the coordinator.
    Under these conditions (i.e. the sensor node is configured not to send any reports), the sensor node will not scan the network trying to associate or re-associate with a coordinator (when it is not available)?

    Then:

    UNBIND (all clusters) --> end-device does not scan the network (rejoin scan)

    Is this correct??

    Thanks again!

  • Couldn't understand your question well? Are you asking about EZ-mode finding and binding?

  • Hi YK,

    No, in my application I disable ZCL_EZMODE:

    I just want to understand what happens after sending an UNBIND command from the coordinator to the sensor node.
    After sending the UNBIND command, if the sensor node loses communication with the parent, will the sensor node always try to associate with the network (rejoin scan and rejoin backoff process)?

  • Hi,

    Just to clarify:

    • The bind/unbind is related to application layer behavior.
      This is useful for things like a sensor sending reports to devices it has performed bind with. Unbinding just means that the respective address is removed from a binding table.
    • The joining/rejoining is related to network layer behavior.
      This layer is concerned with tasks such as routing packets and joining/rejoining a network.

    So, if sensor node receives UNBIND command, it will remove the unbind address from its bind table. The sensor node itself will still be part of the network, and will also try to rejoin the network if it can no longer communicate with its parent.

    For more information on binding concept, please see  .

    Regards,
    Toby

  • UNBIND command is nothing to do with losing parent and rejoin. Only when the sensor node loses communication with its parent, the sensor node will try to associate with the network (rejoin scan and rejoin backoff process).

  • Thank you so much for the replies,

    I wanted a confirmation on the JOINING and BINDING mechanisms. Clear! Thank you!

    I'm looking for a way (application layer) to solve / optimize the following problem:

    I send the UNBIND command from ZC to the sensor node (ZED), then the sensor node will no longer send reports to the coordinator (temperature, lighting, etc.).

    If after this UNBIND command I want to turn off the coordinator even for 7 days, the sensor node will try to rejoin at regular intervals (with rejoin scan duration).

    In this case (coordinator power-off) is there a way to further save battery? For example by modifying network layer parameters, or some tricks.

    I'm looking for some ideas...

    Thanks

  • I suppose you can decrease scan duration and increase backoff duration to save more power in such case.

  • Do you mean when the device receives the UNBIND command I automatically modify the DREJOIN_BACKOFF and DREJOIN_SCAN parameters?
    Is it possible to configure these parameters by command from ZC to sensor node?

  • I don't think UNBIND is designed for such purpose but you can implement your custom command to modify the DREJOIN_BACKOFF and DREJOIN_SCAN parameters from your coordinator.

  • Ok ok.

    I should implement in the application the management of a command for setting the parameters DREJOIN_BACKOFF and DREJOIN_SCAN.

    This command will be sent by the coordinator.

    How can i start doing this?

  • You can create custom cluster and attribute to do this.

  • Thanks YK, what guide / documentation can i follow?

  • Try to refer to

  • Hi to everyone,

    there is command to put the sensor in ACTIVE/ INACTIVE mode from ZC? When the node is in INACTIVE mode it will always be in sleep mode but without activating the rejoing processes.

    My goal is:

    STEP1: check the network operation (for example 30 sensor nodes): associate the nodes and check report receiving.

    STEP2: by command from the ZC to put the nodes in INACTIVE mode for a long time, without activating the rejoing processes.

    STEP3: by command from the ZC to put the nodes in ACTIVE mode, with activating the rejoing processes.

    So the final question is: is it possible to disable the rejoing processes without the sensor nodes losing communication with the ZC? is it possible to change mode (ACTIVE or reactivating rejoing processes) from ZC?

    Thanks

  • There’s no existing such command in ZCL spec and I had suggested you to implement it with custom attribute.