Go Down

Topic: Communicating with multiple XBee's (Read 996 times) previous topic - next topic

Does anyone have a sample or suggestions for a configuration where multiple slave Xbees talk to a master Xbee? This is for a 4-player game, where the master watches for inputs from players and sends them back replies. I've checked the XBee library and it has samples of basic Rx/Tx, but I don't quite get how I can differentiate as to who send the packet to the master. And how do I address the packets back to the right player?
I guess each packet could contain an ID as to which player it's addressed to, and all the other players would just discard, if it's not theirs. Or is each player on a different channel with the master?....

See how lost I am. Can anyone help?
You laugh I laugh
You cry I cry
You fall off a bridge I laugh so hard I fall off with you

PaulS

FIrst, what kind of XBees are you using? How are they configured?

How are you currently sending the data?

If I remember correctly, part of what the XBee library sends in each packet IS the ID of the sender and the ID of the recipient. Sending data from the master to a specific XBee will require reconfiguring the XBee for each send, and then configuring it back after the send. This takes time. During that time, data sent could be ignored by the master.

Quote
I guess each packet could contain an ID as to which player it's addressed to, and all the other players would just discard, if it's not theirs.

That's the solution I'd go for. Simple, easy to implement and debug.

Thanks for you input. With some digging around I determined exactly what you said. Set the ID before every transmit. I suspect I'd have to poll the 4 slaves as well watching for an input.
As for missing data, I don't think I'm that time sensitive. I could have the slave just keep sending it until it gets an acknowledge from the master.

Which XBee am I using? None yet...until I figure out the comm solution (before I spend the money). I'm working on other parts of the project until then. Got the LCD display working no problem and now working on reading the keypad using a 74922 chip.
Once everything checks out I delve into the dark world of wireless communication (LOL).

Thanks again for your response.
You laugh I laugh
You cry I cry
You fall off a bridge I laugh so hard I fall off with you

novice

Titanium69,

I like your approach.  Commission one part at a time!.

pawqar

hi,

I´ve one coordinator and several end devices. I want to difference the messages. A solution could be include the end device´s address in the data segment  but i was wordering if they are a simpliest way to do it.

thanks, and sorry, my english it´s not so good

skater_j10

If you don't already have the Xbees purchased might I suggest trying Synapse Wireless modules. I've tried them and don't think I'll ever go back. They can do exactly what you described straight out of the package, they are able to mesh network by default. You can have one coordinator at your PC that can send Remote Procedure Calls (rpc) to each node individually and can also multicast to all nodes as well. If you want a bit more info I'd suggest checking this Arduino forum thread.

Go Up