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.

ZED cannot join ZC after SystemReset

Hi,

My ZED is a battery-device which goes to sleep for 1min and then wake-up. Now I am measuring the current while ZED loss connection from ZC and trying to rejoin ZC. The scenario is explained as follows:

1. ZED join ZC

2. ZED sends out tempertures and goes to sleep

3. Turn off ZC and ZED will call SystemReset() right after becoming orphan 

4. ZED will send Beacon request after system reset and go to sleep if no ZC is on

5. ZED wakes up and sends another Beacon request and then goes to sleep again if no ZC is on

6. Turn on ZC

7. ZED wakes up and sends Beacon request and ZC responses Beacon 

The question is why my ZED cannot rejoin ZC even though it gets ZC's Beacon response. The attached is sniffer packet.

Thanks!CANNOT_JOIN.rar

  • Do you enable NV_RESTORE on your ZC and ZED when you do this test?
  • I disabled NV_RESTORE on purpose on ZED. Does it matter to ZED rejoin? I will try enabling it again.
  • Actually, even though I enable NV_RESTORE, if ZED was powered on first without ZC on, at 3rd time waking up while ZC is on, ZED cannot still join the new network. That's real issue for me now. If ZC is powered on at 2nd time waking up of ZED, ZED join the network right away. This issue only happens after 3rd time waking up of ZED, ZED will never join ZC anyway.
  • 1. You should enable NV_RESTORE on both ZC and ZED to make ZED rejoin after power recycle.
    2. Do you have sniffer log when you do latest test?
  • Actually, we dont want our ZED rejoin the old ZC and we want it to join any ZC which is available. If NV_RESTORE enabled, ZED will only try to rejoin the old ZC. Our ZED will call system reset once it becomes Orphan to look for any ZC available for it. I am testing one condition now: if no ZC turns on, ZED powers on and starts scanning channel, it will go to sleep when sleep timer expires and call ZDApp_StopJoiningCycle() b4 going to sleep. Next wakeup cycle, it will call ZDApp_StartJoiningCycle() to restart joining cycle.

    I realized that after 2 wakeup cycle, I turned on ZC, ZED did not join the ZC anyway. I have to call system reset again to workaround this issue again. Is there any limit to call ZDApp_StartJoiningCycle() while ZED wakingup?

    Thx!

  • As I know, there should be no limit to call ZDApp_StartJoiningCycle() while ZED wakingup.
  • I know if I dont call ZDApp_StopJoiningCycle(), ZED will keep sending out Beacon Request until ZC turns on and join the network right away. After one wakeup cycle, calling ZDApp_StartJoiningCycle will allow ZED join the network while ZC is turned on already. But it did not happen after 2 wakeup cycle turning on ZC. I saw Beacon Request from ZED and Beacon from ZC, however, no association request was sent out from ZED.
  • Do you have sniffer log that shows ZED doesn't send association request?
  • Yes, see my 1st post of this thread as attached.

    Thx!
  • You can check from Id #77 to #191. From #77, I turned down ZC, my ZED call systemReset and start scanning channel and then went to sleep at #99, wakeup every 1min. At #101, I turned on ZC.
  • From #1 to #8, I powered on ZED without ZC on. After #8, ZED went to sleep and turned on ZC. Next wakeup cycle from #10, Association Request was sent out at #12.
  • I see ZC enables permit join and router/end device capacity is true in sniffer log so the problem should be on your Device. I suggest you to trace and debug your device to find where the problem is.
  • At this point, where can I set breakpoint to trace my ZED? It comes with another issue for debugging and tracing battery-powered ZED while connected via JTAG. Looks like that ZED is always ON connected via JTAG.
  • I found this NUM_DISC_ATTEMPTS set to 2 now in ZDApp.h. I changed to 3 and then my ZED joined the ZC after 2 wakeup cycles. Why this number is set to 2?
  • It is set to 2 to make sure device can get beacon frame from the same ZC or ZR for a certain times then it sends out association request. If you don't think this necessary, you can decrease it.
  • Yes, I reduced this number to 0 and worked fine for me now :)

    BTW, how could I know when ZED sends out Association Request? 

    Thx!

  • You can only use Ubiqua Packet Analyzer to know it.