Sort out data from Two XBee (transmitter) to One XBee (receiver)

I have two boards and one XBee series 1 is attached to each board. A XBee module was connected to laptop through XBee explorer to receive data from both XBee.

The problem that I’m facing right now is the data obtained in serial monitor are mixed data from both XBee.

Is it possible that with Arduino code can sort out the data from both XBee or do I need to connect another XBee module to another port to receive data from each board individually.


You would need to use API mode. When data arrives in API mode it has a header that you can use to determine where the data is coming from.

The manual and the API frame maker can help you understand what is possible.

Hi. Thanks for your guidance.
Now I’ve identified the which sender from the type of RX packet received.
How should I separate the sample? Is it through arduino code or I have to develop some app by myself?


You are recieving the data on your laptop so writing an app for your computer that reads the data would be ideal. You should be getting 0x82 or 0x83 packets depending on how you address the computers XBee on the sensors. The sixth through thirteenth bytes in an 0x82 API packet tell you where it came from. The sixteenth to the end except for the last byte is your data. Just strip those out and then store them in some sort of database and you should be good to go. (check out the manual or API frame maker if you want more details on the packet types and what data you are getting.)

Hi, can you reply my post here?

I think if you put some delay then the data coming from two XBee’s do not mix.
If you are using Digi gateway as receiver then there is a telnet command to check when the data is received at the receiver.
i.e., set trace state=n mode=conc mask=xbee:*