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.

LAUNCHXL-CC26X2R1: Rejoin an end device after ZDO_LEAVE_IND not working

Part Number: LAUNCHXL-CC26X2R1

Hello,

I have two sensors connected to the LAUNCHXL-CC26X2R1 working as a coordinator. When I press the button on the sensors, the devices will disconnect form the coordinator. That's fine. Permit join is on (ZDO_MGMT_PERMIT_JOIN_REQ) - fe052536 0f ffff ff 00 e6 (allowing broadcast join, for all devices, join enabled without duration).

I do get the ZDO_LEAVE_IND from the coordinator:

fe0d45c9 aef3 eef27705008d1500 00 00 00 2a  - ZDO_LEAVE_IND (this is sensor 1)

fe0d45c9 75e6 5a7b4a05008d1500 00 00 00 e4  - ZDO_LEAVE_IND (this is sensor 2)

We can see the ShortAddr, IEEEAddr, Request, Remove and Rejoin are all zero.

I would right away like to be able to have those devices rejoin. However, If I press the button on the devices to re-connect them to the network, it does not work.

If I restart my script device can re-join right away (script does start the network with ZDO_STARTUP_FROM_APP + ZDO_MGMT_PERMIT_JOIN_REQ).

How can I get my devices joining back without the need to restart my script/the network please?

I understand there are some options like ZDO_SET_REJOIN_PARAMETERS and APP_CNF_SET_ALLOWREJOIN_TC_POLICY. Is there a default backoff-timer? Do I need to use those functions?

Thanks,

Robert

  • Hi Robert,

    join enabled without duration

    This is not an option for Zigbee 3.0, as noted in SWRA615 the maximum value is 254 seconds.  If the ZC receives a ZDO_LEAVE_IND with rejoin equal to zero then it will removed the ZED from its association and TC tables.  Thus the ZED will need to perform a fresh join which requires the permit join to be enabled, likely requiring another ZDO_MGMT_PERMIT_JOIN_REQ if the previous join time has already expired.  This is likely why the restart with another permit join request is successful.  Another option is for the ZED to have the rejoin option set if they send a ZDO_LEAVE_IND, or not have them send any disconnects/leave at all if they plan on rejoining the same network.

    Regards,
    Ryan

  • Thanks Ryan. What value has a maximum of 254 seconds? The permit join is enabled with no time limit set. I cannot influence what the sensor sends (I cannot let him set the re-join flag).

    I have done some further tests:

    -> I press the button on the sensor for 3 sec.

    12.08.2022 19:20:49 ZDO_LEAVE_IND (Callback) - fe0d45c9 89d0 5a7b4a05008d1500 000000 2e - Short Address (NwkAddr): d089 - Extended Address (IEEE Address): 00158d00054a7b5a
    12.08.2022 19:20:51 ZDO_TC_DEV_IND (Callback) - fe0c45ca58815a7b4a05008d15000000ac - Short Address (NwkAddr): 8158 - Extended Address (IEEE Address): 00158d00054a7b5a - Parent Network Address: 0000
    12.08.2022 19:20:52 ZDO_END_DEVICE_ANNCE_IND (Callback) - fe0d45c1588158815a7b4a05008d150080ff - Source Address: 8158 - Short Address (NwkAddr): 8158 - Extended Address (IEEE Address): 00158d00054a7b5a - Capabilities: 80
    12.08.2022 19:20:52 - Stats PIR - fe3e44810000000058810101008e008a16a800002a1c5f11010a01ff42210121e50b0328230421a80105218d00062400000000000a2100006410000b211f0058811d19 - Short Address (NwkAddr): 8158 - Battery: 0be5

    -> Device is leaving and does re-join right away, it will get a new address

    This might or might not work once or twice. Sometimes I only get:

    12.08.2022 19:16:52 ZDO_LEAVE_IND (Callback) - fe0d45c9 b4b1 5a7b4a05008d1500 000000 72 - Short Address (NwkAddr): b1b4 - Extended Address (IEEE Address): 00158d00054a7b5a

    -> The assoc number of devices is reduced -1 (I can see that when I start the script again)

    Now, I cannot rejoin the sensor anymore.

    In both cases, the ZDO_LEAVE_IND data is identical with regards to the flags (no re-join set).

    I start the network with:

    #ZDO_STARTUP_FROM_APP
    fe022540640003

    #ZDO_MGMT_PERMIT_JOIN_REQ (0f = broadcast, NwkAddr 0xfffc is BC to coordinator or router, duration is 0xff - join enable without time limit)
    fe052536 0f fcff ff 00 e5

    The ZDO_MGMT_PERMIT_JOIN_REQ does set a duration of 0xff (no time limit) Hence, I did assume this allows devices joining forever (and re-join over and over again).

    Thanks for your help.

    Regards,

    Robert

  • Although the documentation you are reviewing for ZDO_MGMT_PERMIT_JOIN_REQ may indicate that a value of 0xFF sets an unlimited join time, this was only true for the legacy Zigbee HA 1.2 Specification and earlier.  The Zigbee 3.0 Specification, which applies to all SimpleLink CC13XX / CC26XX devices, does not allow a limitless permit join and will reduce the time to a set value (i.e. 254 or less).  Thus the times the ZED join again with a new short address (i.e. not a true Zigbee re-join) are within the allotted permit join time, and you will need to re-set ZDO_MGMT_PERMIT_JOIN_REQ to allow devices to join again.

    Regards,
    Ryan

  • Thanks Ryan. Assuming I issue:

     #ZDO_MGMT_PERMIT_JOIN_REQ (0f = broadcast, NwkAddr 0xfffc is BC to coordinator or router, duration is 0xff - join enable without time limit)
    fe052536 0f fcff ff 00 e5 (or fe = 254 instead of ff = 255).

    This means once my network is up and the join permit command has been issued, I need to join my devices within 254 seconds? If no device joined within this time, I need to re-send the ZDO_MGMT_PERMIT_JOIN_REQ command to basically reset the "allow join counter"?

    If my devices does join some seconds after ZDO_MGMT_PERMIT_JOIN_REQ I can re-join the devices for some time, until the timer of 254 seconds is at zero?

    If my device drops after 254 seconds, I need to re-issue ZDO_MGMT_PERMIT_JOIN_REQ to allow this device to re-join?

    In fact, I did re-issue ZDO_MGMT_PERMIT_JOIN_REQ once I receive a ZDO_LEAVE_IND. In fact the device does re-join right away. This seems to be working fine now. I noticed that only the first ZDO_MGMT_PERMIT_JOIN_REQ is getting an answer from the coordinator (fe016536 00 52). Further ZDO_MGMT_PERMIT_JOIN_REQ commands are not being answered by the coordinator. Is this expected/normal? Just want to be sure, it does not matter as the devices do re-join.

    The question above are just to fully understand the scenario. Thanks for answering them.

    Regards,

    Robert

  • You now seem to understand the situation and what you must do to compensate.

    Regards,
    Ryan