I’m trying to understand the basics of xBee collision avoidance (CSMA/CA). I’ve perused several pieces of xBee and 802.15.4 documentation as well as the wireless forum. I’ve seen a few questions similar to what I’m asking, but have yet to find an explanation re: exactly how CSMA/CA works, or what I should expect to observe if I have a situation where RF transmissions from xBee modules overlap.
Here are some details of a simple setup I’ve got going, and what I’m trying to observe …
simultaneously) sending single bytes (9600 baud) to a common receiver.
transmit 500 us delayed from xmtr 1. (i.e. 1/2 byte time at 9600 baud, so they overlap about 500 us).
(The transmitters are adjacent, so xmtr2 should certainly see considerable carrier energy from xmtr1 when it initially tries to transmit).
I’m monitoring data at the receiver. With a delay between bytes > 1 ms or so (i.e. greater than a transmit byte time) all looks as expected at the receiver … byte1, byte 2 … byte1, byte2 … etc. However, when I reduce the delay time to 500 us (i.e. purposely try to induce collisions), data gets corrupted at the receiver. My question is “why does this happen if the collision avoidance algorithm is supposed to be functioning?”
What I expect to happen is xmtr 2 will back off when it initially tries to transmit (during the overlap period), then send its packet after xmtr 1 finishes. Further, I expect to see xmtr 2’s EC parameter (i.e. CCA failure count) indicate the number of times xmtr 2 had to wait to transmit. However, it just sits at 0.
Anyway, sorry for the long-winded post, but I hope someone familiar with the details of collision avoidance can shed some light on the situation, or point me to some documentation that may help out … will be happy to clarify, or provide add’l information if necessary. Obviously my understanding is lacking.
Thanks in advance