blink led when unlinked

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.

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.

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

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