Other Parts Discussed in Thread: Z-STACK
Hello
Just after some advice on what to do in the following situation.
My coordinator creates a network with a specific extended PANID and several routers / end devices join this network. If after X seconds a router / end device fails to communicate with the coordinator then the device is reset and all being well reconnects to the network as it assumes something has gone wrong. However if the coordinator resets for some reason e.g. watchdog / power cut / user , then I'm unsure of what to do.
The problem:
If while the system is up and running the coordinator resets then the first thing it will try and do is try and create a new network. Unfortunately this network already exists i.e. the routers and end devices. It appears that a new network is created but with a different PAN ID (not extended). Now the routers / end devices will reset themselves after X seconds because they have not sent anything to the coordinator (its on a different network now). However when a device restarts how does it decide which network to join? There are two, the one created by the coordinator and the one that previously exists (routers / end devices)? They both have the same extended PANID.
I was thinking about killing the network quickly with DEV_NWK_ORPHAN state change. When the coordinator reset, the routers connected to it receive the DEV_NWK_ORPHAN state change and reset, devices connected to those routers then receive the DEV_NWK_ORPHAN state change and they reset, and so on and so on. Although for some reason I'm not receiving the DEV_NWK_ORPHAN state change. Not even sure if thats the best way to do it anyway.
Luka