I tried to install routers near the coordinator as much as I could,, but not all of them are at this situation. I have some routers connect between themselves, but not with coordinator directly.
This is fine.
As all my routers devices work with liPo or li-Ion batteries, when any of the router, without line-of-sight, exhausts the battery, the network breaks down.
Routers should be mains-powered. Failing that, the network topology and physical layout needs to allow for sufficient redundant routes.
I said that because routers have to detect coordinator in the first time it begin to work, so if battery goes down, when I change it, I have to move my device all along the network and come back.
This is not my understanding. The router should retain ID, OP, OI, CH, etc., and even if the coordinator is not present when the router is powered back on, it should work. Communication with the coordinator is only required when first joining the network, and powering a router down does not break the network association. I've done this and verified that it works this way.
Is there any option for maintaining the network parameters even if the coordinator isn't near enough??
Could it be as simply as modify 'NW', 'JV', 'NT' or 'NO' parameters??
In general, I wouldn't go twiddling with too many parameters, stick with the defaults as much as possible. NW forces a router to leave the network if it loses contact with the coordinator, I'd leave it at its default value, which is disabled. NT and NO are options for network discovery (ND command), which is really just reports network information.
If the coordinator is replaced, the new one may choose a different values for OP, OI, CH, and this can cause other devices on the network to not be able to communicate with it (although they will continue to communicate with each other as noted above). See "Replacing a Coordinator" in the product manual. JV=1 may help this, but I've not tried it myself, and I'm not sure if this is the problem you're seeing.