Setup xBee (Serial) network

I want to setup a xBee network with four serial 1 modules. Any two of them can communicate with each other in two-way. The transmitted data is string other than a single byte.

My original design is to setup a nonbeacon (w/coordinator) network: One module is configured as coordinator. The left three modules is configured as end devices. The coordinator broadcasts the data from end devices.

The communication workflow is: If end device 1 want to send data to end device 2, it sends data to coordinator first. Then the coordinator broadcasts the data received from end device 1. End device 2 can receive the broadcast data. The communication workflow finishes.

I want the received string is Atomic. If end device 1 and end device 3 send out the data in the same time, there would be conflict. The two strings would combined together. And the end device 2 can’t distinct which byte is from which device. I.e. end device 1 sends out string “{AAAA}” (Quotes aren’t included). In the meanwhile, end device 3 sends out string “<2222>”. The end device 2 may receive the string like “{A<22AA2A2}>”, which isn’t what i want. My expected string is “{AAAA}<2222>” or “<2222>{AAAA}”.

The question is: How to setup the network to meet my requirements?

I want to setup a xBee network with four serial 1 modules. Any two of them can communicate with each other in two-way. The transmitted data is string other than a single byte.

You really want series 2 modules to create a network.

Series 1 modules are for point to point, where there are exactly two modules involved.

However, if you use API mode, you can have any XBee talk to exactly one other, specific, XBee, AND the other XBee can change with each massage sent.

Packets sent using API mode do not conflict with each other.

Thanks Pauls. I'll have a try with API model.

I'm not familiar with series 2. If use series 2, how to resolve the conflict when multi-devices send string data to one device in the same time.

If use series 2, how to resolve the conflict when multi-devices send string data to one device in the same time.

Use a master/slave relationship. The slaves reply when the master asks. The slaves do not blurt out whenever they have something to say.