Xbee Series 2 Unicast to Multiple Units

Hi,

I'm working on broadcasting from a Coordinator Xbee S2 to 2 Router/End Device Xbee S2. These end devices act as wireless sensor unit with an arduino,xbee and a sensor. I've successfully enabled a point to point communication between Coordinator and End Device in cyclic sleep mode of both 10minutes(actual timing) and 40 seconds(testing timing). What I need to do is to "broadcast" this instead of just unicasting to one End Device.

The method I intend to use is to unicast to all existing sensor units (2 of them) to act as a "broadcast". I encountered some weird issues such that sometimes it works for 1-2 "broadcasts" before failing and sometimes it fails totally all the time.

Thus, would like to ask what I might be missing out on about uni-casting to multiple devices on top of uni-casting to a single device. Do take note that the Xbee Series 2 are all on cyclic sleep. Thanks!

Do you have the same issues when the XBees get a shot of caffeine, and can manage to stay awake for a while?

Help me understand. Series 2 XBees either broadcast or unicast. The difference is that unicast is routed to only the address you specify and broadcast goes to all of them. If I understand you correctly, you've been testing using unicast and now you want to broadcast instead, right?

If I got it correctly, then you may be suffering from data timeout. Take a look at the XBee document under unicast timeout and try out the numbers you're using. In unicast mode (point to point transmissions) the XBee will automatically extend the packet timeout so the end device can have a chance to receive it. In broadcast (one to many), this doesn't happen. Also, in unicast mode, you can look at the transmit response code to see if the message actually got sent correctly and you can require an ack to tell you the other end got it. This stuff doesn't work the same in broadcast. In broadcast, you'll get a good transmit response code if it can send the message at all and the ack works differently. Assuming you're using API mode, not AT mode. In AT mode, you don't get any of this stuff.

The XBee document: http://ftp1.digi.com/support/documentation/90000976_G.pdf and they talk about timeouts down in the mid 60s somewhere.

Hi,

Thanks for the reply!

@PaulS: I understand what you mean. I've yet to test that and will test it on Monday back in school. I'll post again the results without cyclic sleep. =)

@draythomp: It's my pleasure to help provide info. =) I'm trying to "broadcast" in a sense. In actual fact, I'm just trying to uni-cast to all the end device nodes by transmitting to all the addresses. I'm working in API mode using xbee-python for Coordinator side. For End Device, it's Atmega328p optiboot that does the work. I don't actually look at the real broadcast method as I've seen bad results about using that from the forums. Since I've to setup each Xbee properly, I can just store a dictionary of addresses in the python code easily after the Xbee setup. I haven't really look at the transmit response code as I'm not sure how to do it using the xbee-python.

Thanks too for the help in the past month that got me to this stage. My project is really progressing properly. =)

Hi,

I suddenly thought I should clarify something too...

What I am trying to resolve is this: I want Coordinator to unicast to both End Devices and then start to wait to receive from the End Devices when they wake up. This is not really working. (sometimes it works for one or two tries and then it fails all the way.)

What is working: I made the Coordinator unicast to ONE End Device and wait to hear it. Upon receiving, I made the Coordinator unicast to the next End Device and wait to hear again. This is working very well.

However, my project requires simultaneous transmissions which is the first one. I have tried to increase the time between the unicasts and it kind of improve a bit but still fails after that. (gives me a few more successful transmissions sometimes) I couldn't pinpoint the error especially since there are sometimes successful transmissions at the start. (means that this isn't entirely wrong)

Anyway, I'll test out without cyclic sleep tomorrow. Just my thoughts as I'm thinking to make clearer my issue. =)

Hi,

I've successfully made it to work. The problem lies with the Xbee settings. I've been using Zigbee Coordinator/Router API settings. This doesn't work for multiple unicast. Anyway the forum post below speaks about switching over to ZNET2.5 Coordinator/Router API settings.

Once I switched over, it worked like a charm. =) Hope this info can help others too.

That is so weird. Znet 2.5 is supposedly retired in favor of Zigbee. The series 2b modules aren't even supposed to be able run that software. Or, I've managed to get it totally wrong somehow.