Xbee collision

Hi,
I’m currently facing a problem:
I’ve 2 Xbee serie 1 connected to X-CTU, in API mode 1 with RN = 3.

Each of them sent 1000 frames to the other with 100ms between each. So on the 2 sides, at the end, I should receive 2000 messages (1000 tx Acks + 1000 messages from the other Xbee), but I don’t, only something like 1800.

So what are the best parameters to avoid collision?
In the final apps, there’ll be up to 5 Xbees, exchanging messages with only 20ms.

I’ve tested it, with one end-device sending at 10ms, and one receiver, it’s works perfectly. Messages are 60 bytes long, at 10ms, it’s “only” 6000 bytes/s.

I’m on this pb since 1 week, and out of ideas.

Kabriolin,

Your expectations of data throughput are very aggressive. I’m not surprised you are seeing difficulty. Keep in mind that the total throughput is only 250kb (bits not bytes). sending 6000 bytes/s is a significant fraction of the total throughput. Your probably eating up the rest with overhead. Keep in mind too that some of it is wasted as well.

Here are some things that might help your situation:
reduce the frequency of data packets.
don’t broadcast (don’t have DL=ffff)
lock down scan channels (SC) to a single channel. that way the module won’t cycle through periodically.
disable encryption
disable sleep (assumed you’ve already done that)
mac mode without acks (MM=1)
RR=0 (3 retry minimum)
RN=0 (disable collision avoidance)
set serial port to max speed (BD=7)

One really good tool to see what is going on is an 802.15.4 sniffer. I suspect there is a lot of other traffic going on that you’re not aware of.

Actually the 250kbps is the over the air data rate and it not the throughput;. The actual throughput is much less at around 80kbps.

kabriolin,

In your case you have just 2 nodes tx each other, so that you don’t have collision in this case because the shared medium is half duplex. Also check the distance of the nodes and clean the buffer for each tx. If u got one wrong bit the checksum will be different and that packet will be discarded. Finally if for any period the channel has more energy than the CCA treshold, there would not be any tx.

Also try interfacing at a lower baud rate. The actual rate the XBee 802.15.4 runs at is 111,111bps due to the clock divisor used. You can also try interfacing with 2 stop bits instead of 1. Just make sure that you use hardware flow control as the actual throughput after overhead is around 80kbps half duplex.