# blink led when unlinked

**URL:** <https://forums.digi.com/t/blink-led-when-unlinked/15433>\
**Category:** XBee - Zigbee\
**Tags:** led, link, atai, xbee, zigbee\
**Created:** [September 21, 2015, 11:46am UTC](https://forums.digi.com/t/blink-led-when-unlinked/15433 "2015-09-21T11:46:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlabs](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@schlabs](https://forums.digi.com/u/schlabs)\
**Post date:** [September 21, 2015, 11:46am UTC](https://forums.digi.com/t/blink-led-when-unlinked/15433/1 "2015-09-21T11:46:25Z")

</div>

Hi:  
I am trying to mount a zigbee network. At this moment in the prototype stage i get communication.  
But i know that in the real world i will get communication lost caused by:  
-Temporary out of range of module - coordinator.  
-unexpected coordinator shutdown and powerup. (include channel change)

I need that the end-devices detect when the network is broke and send “atnr0” “atsc” to rejoin. (\*1)

i do a function that do the following:  
-send ATAI (if atai=00 return)  
-wait pooling ATAI up to30 secconds (if atai=00 return)  
-ATNR0 and restart pooling cycle.

I was noted 2 things:  
1)the link led blink even if the coordinator is powered off.  
2)“atAI” answer 00 including if the coordinator is powered off.

Why happens this, and how i can correct this?  
Best Regards  
Christian

(\*1)atjv1, atwd1 is previously configured, but 3 minutes of watchdog is so long time and i cant wait 3 minutes.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [September 21, 2015, 11:53am UTC](https://forums.digi.com/t/blink-led-when-unlinked/15433/2 "2015-09-21T11:53:25Z")

</div>

Why are you doing all of that. A zigbee end device will poll its parent three times. If it is unable to poll its parent, it will perform a soft rejoin request on its own. If it is then unable to re-join the network after three more time on the re-join, it will go into a Full Join process on its own.

---

<div class="post-metadata">

**Author:** ![schlabs](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@schlabs](https://forums.digi.com/u/schlabs)\
**Post date:** [September 21, 2015, 2:10pm UTC](https://forums.digi.com/t/blink-led-when-unlinked/15433/3 "2015-09-21T14:10:29Z")

</div>

I do the following test: After get a sucessfull link, i Power down coordinator, and restart it performing ATSC to get a new channel.  
-In the end device Link led still blinking (why?).  
-Watchdog do not rejoin after 1 hour of connection lost  
-Data is not received on the coordinator.

As i read in the datasheet the watchdog, need 3 fails ( one per minute). I have a 40kB/s of GPS (accelerometer and etc) of data in a race sport enviroment. As you can imagine 3 minutes is equal to a complete data lost of data.

So i need know when the link becomes down to get a rejoin in a max time of 15-30 secconds.

I also do the test: powerup first the end device, and remain OFF the coordinator. But link led start to blink …  
Thanks you

---

<div class="post-metadata">

**Author:** ![schlabs](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@schlabs](https://forums.digi.com/u/schlabs)\
**Post date:** [September 21, 2015, 2:39pm UTC](https://forums.digi.com/t/blink-led-when-unlinked/15433/4 "2015-09-21T14:39:28Z")

</div>

well i add atsm=4 in the end-device and link led start to work as spected.  
ATD5=1 Blinking led when link  
ATSL  
ATCE=0  
ATSM=4 (end device)  
ATID1234  
ATJV1  
ATPL4  
ATNW1  
ATAC  
ATWR

I still need investigate why atai answer 00 ( linked)  
Best Regards
