5
\$\begingroup\$

I'm getting started with XBEE S2 modules and I have a doubt I still couldn't get a clarification, hope you guys can help.

I want to have 2 end devices transmitting data to one coordinator, all of them working in API mode (escaped characters). The data should be sent "as fast as possible" so I'm afraid I will get many collisions. How XBEE deals with that?

On the the RX packets I can get the source address but I need to read many bytes before I know it. What happens if while I'm reading bytes from a packet the other end device starts to send another packet? If XBEE implicitly uses collision avoidance, are that "per byte" or "per packet"?

Thanks!

\$\endgroup\$

2 Answers 2

6
\$\begingroup\$

The radio being used by these modules (MAC & PHY layer) is defined by the IEEE 802.15.4 standard which specifies the use of Carrier sense multiple access with collision avoidance or abbreviated as CSMA/CA.

A simple summary, a device will do a quick scan of the channel that its PAN network is on and if it senses that it is being utilized it will wait and retry using a random exponential backoff scheme. Using this method, you can think of the channel as a shared resource that is "taken" by a device to do a burst transmission and then released for others to use.

Further questions about reliable transport can be answered by reading about it in the Zigbee spec or IEEE 802.15.4 spec.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the clarification! But... is the collision avoidance "per byte" or "per packet". I guess "per byte" doesn't make much sense but I would like to make sure of that. \$\endgroup\$
    – cidadao
    Aug 4, 2012 at 0:29
  • \$\begingroup\$ @msr Definitely per packet. Also note that collision avoidance isn't 100% successful - you still need to have an acknowledgement channel and retransmissions to make it a reliable transport \$\endgroup\$
    – vicatcu
    Aug 4, 2012 at 2:05
1
\$\begingroup\$

I don't know the specifics of XBee, but I believe it's a pretty heavyweight protocol. As such I would wager it employs both collision avoidance (at the medium access control level) and automatic retransmissions (akin to TCP) and does so at the packet level.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.