Go Down

Topic: Xbee Question- Relay Network (Read 1 time) previous topic - next topic

Icanfly

Oct 02, 2009, 08:42 pm Last Edit: Oct 02, 2009, 08:46 pm by Icanfly Reason: 1
It wasnt tooo clear from tutorials but can I use the xbees to transmit a message across three xbees in a line?

Its pretty important I can do this, the manual sort of says yes but what would happen if the xbee in the middle got two messages from either end?

Would the incoming packets of information corrupt each other?
Or Cause a data pile up?
For example say I set every xbee to talk to every xbee?

I have no doubt xbee is an amazing transceiver but I just want to check before I buy.
I think its a peer to peer network am making tho by definition its just relaying messages back and forth.

3 arduinos 3 xbees, a quiet complicated system am building atm

Ill Mill

There are two different Xbee technologies that I know of, series 1 and series 2 (or 2.5). Series 2 units are ment to opperate in "Mesh Networks" therefore when you all the nodes in the mesh will pass the message on to all the other nodes. Series 1 I believe is just point to point.

Here is the digi website that has the user manual for the series 2.5 modules.
http://www.digi.com/products/wireless/zigbee-mesh/xbee-series2-module.jsp#docs Look on page 23 of the manual it sort of explains it.

Icanfly

Ahhhh right I see

Also that clears up the difference between 1 and 2.5
This SHOULD make life easier but I hear alot of people having
trouble setting  them up.

I had a read of a few tutorials and setting the device to only be received by a particular address does this mean that other devices will receive it and pass it along but not read it.

The manual is big  :o deciding what you need and dont need to configure is a little complex.

I have never used the older "Series 1" or "802.15.4" Xbee, but with the newer ZB modules it is quite easy to send a broadcast message that all modules in the network will receive by setting the destination address to xxxxffff.

The ZB range does use mesh networking, but this really has nothing to do with broadcast messages, as I have interpreted the voluminous documentation.

If you want to send a message to two other modules, whose hardware addresses are known to you, I think it would be better to just send the message twice, once for each destination address. I am not an Xbee guru, but that is how I would do it.

Icanfly

Yea I understand you can set it to be received by every address but does this mean that the message will be passed down the network?
if so yey!

Also I dont think you can send it to two different addresses =/ at the same time.

See if I can explain my network better

A has to communicate to B and then Speak to C then C transmits back to A through B. BUT A has to also control something at B but only initially.
(Am deploying a robot with another robot from a distance)

a) With the newer Xbee ZB or Xbee 2.5 modules you will have a mesh network. If A is not able to talk directly to C then B will relay the message from A to C. So yes, messages are passed on in the network. If node C is an endpoint and a network child of B then I think B will be responsible for passing a broadcast message on to C.

b) With the normal AT command mode you can send a message to either all other modules in the network (broadcast), to the network coordinator or to one specific module. If you want the message to be sent to two other modules you will just have to send it twice with different addresses. In API mode you might be able to send the message to two recipients at once, I am not sure. This mode is more powerful and also mor complex to understand/use.

If A is sending a message addressed to C, and the message goes through B, then B will relay the message without reading the contents. At least that is my impression of how it is supposed to work.

I have not checked the documentation for the specific situation you ask about in your initial post, but I am quite sure that if both A and C try to send a message to B at the same time, then the network will handle it somehow, probably by allowing either A or C to send its message first and for the other sender to resend its message a bit later.

My impression of the Xbee network structure is that it is quite stable, and that you can be certain that your messages will get through to the intended recipient. I am no expert, though. I have a few modules and I have done some testing, and I have browsed the documentation, but I have not used it in any real world application yet.

Regarding Xbee, I would like to pass on a tip I read somewhere. Digi, the company behind the Xbee modules, have a contest where you are supposed to design something using specific Digi hardware. To make it easier for individuals to participate they are selling starter kits at a greatly reduced (I think) price. Anyone can order these kits, there is no obligation to participate in the contest.  I ordered an X4 Starter Kit which among other things include an Xbee to/from ethernet gateway and a mains powered "wall router", basically a unit that extends the network coverage by acting as a repeater. These kits may not be what you need for robotics, but it is rather cool hardware which is fun to use. Using the X4 gateway (programmable in Python) you could e g access you robot over Internet from anywhere.

Icanfly

Ahhhh think I got it now

on page 23 and using the information which explains braodcasting to all modules, and the set up on on page 34 of the xbee series 2.5 manual.
I was confusing my self
I could just get each module to broadcast, and if xbee is as stable as it sounds that should work. No specific addressing, as I think of it xbees shouting to each other.

I could then encode the serial data so messages are only read by the appropriate module!

The manual being so huge shocked me at first :o which sort of demoralized me.

FOR ANYONE ELSE WITH SIMILAR PROBLEMS
To summarize XBEE can do a broadcast in which every module gets it even if a module is several modules down the line AS LONG as it is in the same PAN network.<---------------THAT IS WHAT I NEEDED TO KNOW

OR

A Specific Destination to a particular Xbee in which is explained in the manual.

Am just gonna broadcast for the most part and specifically address IF i need too. I think Xbee has enough data encoding and parity checks and very sociable chips to work together well.

Xbees are BFF's  with each other on set up network by the sounds.  :D

Those packs are just random

Thanks!!!!!!!

Now to put Theory to practise!!!  8-)
Do correct me if am wrong!

If you will be using the newer Xbee ZB (or Xbee 2.5, I think) modules then one of the modules will have to work as "coordinator". The other modules will register with the coordinator and by default they will all end up in the same PAN network.

When I bought my first modules I had not realized this, and it took some time to get the network up and running. I had to download the coordinator firmware to one of the modules in order to get a functional network. Now that I have some more advanced Digi hardware the X4 gateway is acting as coordinator.

When you decide on which module that should be coordinator, remember that it should be the module with the most uptime, preferably it should be powered at all times. Other modules will not be able to talk to each others unless there is a coordinator to register with.

The older Xbee modules did not need a coordinator, but I think the network was less advanced using those older modules, maybe less robust, and I do not know if they supported broadcast messages at all.

Icanfly

#8
Oct 03, 2009, 04:45 pm Last Edit: Oct 03, 2009, 04:47 pm by Icanfly Reason: 1
Yeah Av read this

Very Handy Link I found for setting XBEE and firmware up

http://antipastohw.blogspot.com/2009/01/xbee-shield-to-xbee-shield.html

Pretty sweet as you dont need any fancy equipment part from an xbee shield. Other tutorials were not so help full as it involved me buying more stuff then I would need!

Only problem with broadcasting is it transmits 3 times so to what consequence this would cause I am not sure, hopefully Xbee is designed to compensate at the receiving end!

Go Up