[Big problem] Communication between multiple Arduino (with Xbee) without errors

Good gentlemen,

It is a great pleasure to participate in this Forum and I'm a hell of a problem:

I have 6 Arduino + XBee (these end-mode device) + 1 XBee coordinator in a UartSbee to receive the data.

When I put a kit only (+ Arduino XBee) to talk to the coordinator, I get the tags correctly, within the X-CTU [Terminal]. But when I put there two or more overlapping tags (remember that each has its different programming arduino) and thus send all information at the same time w / o Coordinator and becomes a big mess.

My question: How to communicate with each kit at the right time without the overlay of information due to sending data at the same time between my various Arduino + XBee's?

I await urgent response! I do not know how to proceed! Help me!

My question: How to communicate with each kit at the right time without the overlay of information due to sending data at the same time between my various Arduino + XBee's?

Have you ever been in a classroom where all the students are yelling at once? That's the problem you have now.

Then the teacher comes in and says "Sit down and shut up! You will only speak when I call on you.".

Suddenly, what each student has to say is clearly distinguishable.

You need to have the controller broadcast a message "Unit 1, what have you to say?". Then, read the response. Then, broadcast the message "Unit 2, what have you to say?". Repeat for the other 4 units.

Thanks!

The problem is: How do I do this in arduino?

The problem is: How do I do this in arduino?

How do you do what?

Make an Arduino not send data whenever it wants?
Make an Arduino read data sent from the master?
Make the Arduino parse the data sent from the master?
Make the Arduino do something only if the message is meant for itself?

What part(s) do you need help with?

If the answer is all of them, I think the project is beyond your abilities at this time.

hi everyone!

I´m have the same problem. I have one coordinator and multiples end devices. The end devices sends continuosly data, for example temperature. But, suddenly the coordinator can send a request asking for something in particular. Here, i find the problem, `cause if the coordinator talk to a device, it need to differenciate the responser of the previous request from the constinously messages from the others end devices, what I mean is
I want to diference who belongs each message.

A solution could be: the coordinator reads a packet and determines from which end device is from. I could add the address of the end device but it means overload, and I was wondering if there is a easiest solution to solve the address of the source.

Another could be, send silence messages to end devices less the one you are insterest to talk and then just talk with him. Later iniciate again the continiously messages. But now, how could I stop a end device to send data.

well, sorry, my english is no good enough

I hope you could help me

thank you!!

What PaulS is saying is that you can't just have everybody jabbering at the same time, you must have some control.

the coordinator reads a packet and determines from which end device is from.

But if everyone is talking over each other the packet may be corrupted.

send silence messages to end devices less the one you are insterest to talk and then just talk with him

That is a bit back to front really. Better to have every one quite by default and specifically allow one to talk.

Any form of multi-master (all talking at once) will give you grief, much easier to have master/slave.

Unless there is a very good reason for multi-master then polling is better/easier.

Master: #1, what's your value
#1 : 123
Master: #2, what's your value
#2 : 456
Master: #3, what's your value
#3 : 789


Rob

Thanks Graynomad,

mmm I could do that. The coordinator asking for data consecutively.

So, there is no way to know the end device´s address... Although if I use polling it´s no longer necessary.

I was wondering if you know a tutorial of xbee library or API on arduino ... cause I found this one but it´s a little bit tricky: http://code.google.com/p/xbee-arduino/

anyway

thank you for your time

I was wondering if you know a tutorial of xbee library or API on arduino

I'm a frayed knot.


Rob

Hi,

I find out a function which gives you the address who belongs a packet:

Rx16Response rx16 = Rx16Response();

address_fio = rx16.getRemoteAddress16();
data = rx16.getData(5);

Now, knowing the address I can differenciate packets that the coordinator receives from

I hope it could be useful

greetings

(sorry for my english)