I’ve been watching this thread without finding much that I can usefully contribute, but may I offer a few random thoughts?
First, what is the nature of this chain? I could imagine a need for a chain if the nodes in it were far enough apart that only direct neighbours could talk to each other at all, yet your concerns about interference seem to indicate that that isn’t the case. I think what I’m getting at here is that if we knew a bit more about your application we might be able to make other suggestions for the topology.
Assuming now that the nodes really do need to behave as a chain, I can’t see why there’s any need (or indeed possibility) to enforce the chain by use of channels or PAN ids. At any given moment in time, any single module can have only one PAN id and can be on only one channel. So if channels or PAN ids are used to construct the chain, individual modules must switch channel or PAN id in order to communicate up or down the chain.
For that to happen, we would have to assume that each XBee was connected to a processor of some sort which would handle the switching - XBees can’t change channels or PAN ids on their own.
Thing is, if each XBee has its own processor then it seems to me that the obvious way to create the effect of a chain is by making that processor direct each message to its correct partner by setting the destination address (DH/DL) parameters correctly for the message. If you do this, then in fact all the chains could have the same channel and PAN id. Every packet would be addressed to a unique module, so there would be no confusion.
I just said that every chain could share the same channel and PAN id, so here’s some amplification on that.
To take the PAN id first. All modules on a given channel will hear all packets sent on that channel, and each module must process the packet enough to discover whether the packet’s PAN id matches that of the module. If the PAN id doesn’t match, the packet is ignored. So if you’re worried about congestion, PAN ids probably don’t help.
In fact, my own understanding of the PAN id is that it’s a way of distinguishing “my” XBee network from “your” XBee network. Imagine that you set up your network, and unknown to you someone else in the same area is also using XBees for another application. If you have different PAN ids, your networks will not conflict. There are 65536 different PAN ids so if each of you chooses one at random there is very little likelihood of a clash.
The channel can be used to reduce congestion, because modules on different channels simply won’t hear packets sent on other channels. You could use this to improve data throughput by assigning different channels to different chains. However, the other reason for selecting channels is to avoid frequencies that have interference on them (it’s not just XBees that use these frequencies). So you could in principle find that setting all your XBees to use the channel that has the least interference would actually give a better throughput than using multiple channels. What I’m trying to imply here is that channels are not the best solution if you want to create a chain, because their more important use is to avoid interference.
One thing I haven’t seen in this thread is an estimate of how much data will be transmitted. Are we talking about video streams here (in which case no chance!), or are these modules transmitting a few bytes per day? Presumably somewhere between those extremes, but roughly where?
I know that this answer doesn’t directly address your questions. But I hope that if you can add any comments we’ll all get a better idea of how we can give you morehelp.