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.

CC2531: Joining vs Rejoining

Part Number: CC2531

Hi all,

Is there any way to differentiate between a joining and a rejoining procedure ?

I'm using a CC2531 ZNP  coordinator (ZStack 3.0.2) and I receive the same ZDO_END_DEVICE_ANNCE_IND notification in both situations.

I would like to handle differently the two scenarios in my ZAP. Is this possible ?

Also, is there a way to detect in the ZAP that one triggered a hardware factory reset (for example, having the toggle button of a plug-in unit pressed for 10 seconds) on a device which is already joined to a network ?

Thank you,

Eugen

  • Hi,

    Q: "Is there any way to differentiate between a joining and a rejoining procedure ? I would like to handle differently the two scenarios in my ZAP. Is this possible ?"

    A: By default, there is not an MT API which indicates to the ZAP that differentiates between a remote device joining and rejoining.
    Couple options:

    • Create your own MT API to indicate a join or rejoin. To differentiate between joins/rejoins, In function ZDO_JoinIndicationCB of ZDApp.c, there is an argument "type" which specifies the type of join which is occurring.
    • Record which devices have joined in the ZAP. Then when the ZAP receives a ZDO_END_DEVICE_ANNCE_IND, it can compare the address(es) of that indication against the address(es) known by it. If the ZAP has seen this address before, then it knows the remote device performed a rejoin. 

    Q: "Also, is there a way to detect in the ZAP that one triggered a hardware factory reset (for example, having the toggle button of a plug-in unit pressed for 10 seconds) on a device which is already joined to a network ?"

    A: By this, do you mean that the ZAP should know that a remote device has factory reset?

    If yes:

    • Then using one of the above two options should suffice. A factory reset device will send an Association Request (rather than a Rejoin Request).
    • The remote device could be designed such that it sends a Leave Request before performing a factory reset. This may then be sent as an indication to the ZAP (see ZDO_LEAVE_IND).

    Regards,
    Toby