How to check if radio is not connected to a coordinator

I am issuing the command AI when it is connected and it returns 0 as in its connected but if i manually bring down the coordinator, it will still return 0. Is there a better AT command to issue for this?

Also, what command can i issue to see if the radio is functioning as a router or endpoint?

I know Zigbee better than pure 802.15.4, but unfortunately in ZigBee, ‘being connected’ is not the same as the peer existing. The systems are designed to be robust enough to recover if some nodes come and go.

So “bringing down the coordinator” shouldn’t make the routers feel “unconnected” for quite a long time (hours?). They will sit there assuming association even if the coordinator is gone. So if the coordinator recovers a few hours later, the system is still intact and a dozen routers (once joined) can happily talk without the coordinator being present…