I am setting up a network with one Coordinator node and up to 10 End Device nodes. The end nodes are connected to Arduino boards. It seems as though I can collect data from 2 end nodes simultaneously; however, I have not been able to for more nodes than that. I am not well versed in networking and have only set a couple parameters. Here is my setup
Coordinator Node:
CH = C
ID = 1900
DH = 0
DL = 0
MY = 2000
CE = 1
A2 = 7 - 1(allow association) 1(allow channel reassignment) 1(allow panid reassignment)
BD = 5 - 38400
End Nodes:
CH = C
ID = 1900
DH = 0
DL = 2000
MY = 100x (where X is a given sensor id number)
CE = 0
A1 = 6 - 0(Allow panid reassignment) 1 (allow channel reassignment) 1(auto associate) 0 (poll coordinator on pin wake)
BD = 5-38400
My question is are there other parameters that I should set that would allow the coordinator to collect data from 2+ sensors? Ideally, I would like the data to come out like
1
2
3
4
1
2
3
4
where the number is the sensor it was taken from. Of course I know it may not be perfect; however I would like it to be as close as possible. Is there a way to have the coordinator collect a packet from each node in sequence (i.e. poll node 1, get packet then move on to node 2, get packet etc)?
Thank you in advance for your help. It is greatly needed and appreciated.
If you want the coordinator to poll each sensor in turn, you wouldn’t (and can’t) do that by setting parameters. You’d do it by writing a program to run on the computer that’s connected to the coordinator. That program would then control the polling and deal with the responses.
If you just want each sensor to be read every so often, then you can set parameters on the remote XBees so that each will sample its inputs at a specified interval and transmit the results to the coordinator. That doesn’t guarantee that the samples will arrive in any particular order, but each sample set will contain the address of the XBee that sent it, so you will know which is which. That would simplify the programming of the host computer because it would simply have to receive the packets without worrying about polling.
The fact that you’re using a controller/end point setup implies to me that the end points will be battery powered, and therefore you’d want them to spend most of their time asleep. If that’s the case, then the second solution would sound like the more appropriate one.
I hope that’s helpful - if not, come back with more questions.
Thank you for your reply. Do you know what could be going wrong for my setup to only seem to be able to collect from 2 end nodes at a time? The parameters I set for the end node and coordinator were in my 1st post. Is there something I’m missing in that regard?
I figured there was no way to set parameters to poll each sensor; however, didn’t hurt to ask. yes the end nodes are battery powered. They are attached to arduino boards that are sampling at 100Hz. Does anyone have example code or other resources I can use to set up a program that could poll the end nodes for data?
If you’re trying to transmit sample packets at 100Hz that’s probably the problem. Try setting the sample interval to 1Hz and see what happens then.
If it works, you can increase the sample frequency until you find the limit.
If it doesn’t work, then it’s time to post all the XBee settings. To do that, use X-CTU to save the settings of the coordinator and an end point to .pro files, and attach those to your post. Then we’ll be able to see what’s going on.