Networking
Clear Channel Assessment (CCA)
Digi XBee® 3 802.15.4 RF Module User Guide
107
Clear Channel Assessment (CCA)
Prior to transmitting a packet, the device performs a CCA (Clear Channel Assessment) on the channel
to determine if the channel is available for transmission. The detected energy on the channel is
compared with the
CA
(Clear Channel Assessment) parameter value. If the detected energy exceeds
the
CA
parameter value, the device does not transmit the packet.
Also, the device inserts a delay before a transmission takes place. You can set this delay using the
RN
(Backoff Exponent) parameter. If you set
RN
to 0, there is no delay before the first CCA is performed.
The
RN
parameter value is the equivalent of the “minBE” parameter in the 802.15.4 specification. The
transmit sequence follows the 802.15.4 specification.
On a CCA failure, the device attempts to re-send the packet up to three additional times, meaning a
total of four attempts.
CCA operations
CCA is a method of collision avoidance that is implemented by detecting the energy level on the
transmission channel before starting the transmission. The CCA threshold (defined by the
CA
parameter) defines the energy level that it takes to block a transmission attempt. For example, if CCA
is set to the default value of 0x32 (which is interpreted as -50 dBm) then energy detected above the -
50 dBm level (for example -45 dBm) temporarily blocks a transmission attempt. But if the energy level
is less than that (for example -70 dBm), the transmission is not blocked. The intent of this feature is to
prevent simultaneous transmissions on the same channel.
You can disable CCA by setting
CA
to 0. Disabling CCA can improve latency in noisy environments, but it
can also interfere with other devices that are operating on the same channel. Setting or changing
CA
to a non-zero value only takes effect upon boot. If you adjust the
CA
value, ensure that you write the
setting to flash with
and restart with an
In the event that the energy level exceeds the threshold, the transmission is blocked for a random
number of backoff periods. The number of backoff periods is defined by the following formula: random
(2^n - 1), where
n
is defined by the
RN
parameter and increments after each CCA failure. When
RN
is
set to its default value of 0, then 2^n -1 is 0, preventing any delay before the first energy detection on
a new frame. However, n increments after each CCA failure, giving a greater range for the number of
backoff periods between each energy detection cycle.
In the event that six energy detection cycles occur and each one detects too much energy, the
application tries again 1 to 48 ms later. After the application retries are exhausted, then the
transmission fails with a CCA error.
Whenever the MAC code reports a CCA failure, meaning that it performed six energy detection cycles
with exponential random back-offs, and each one failed, the
EC
parameter is incremented. The
EC
parameter can be read at any time to find out how noisy the operating channel is. It continues to
increment until it reaches its maximum value of 0xFFFF. To get new statistics, you can set
EC
back to
0.
Retries configuration
If you are operating in a MAC Mode that enables MAC ACK (
MM
=0 or
MM
=2), each RF packet will be
sent with up to five 802.15.4 MAC-Layer retries, meaning six transmission attempts are performed.
This is enabled by default and provides a minimal amount of reliability to unicast transmissions.
If you are operating in a MAC Mode that enables the Digi header (
MM
=0 or
MM
=3), then you can
optionally include Application-Layer retries using the
command. Each Application-
Layer retry attempt to send the packet using five MAC-Layer retries. This can greatly increase the
reliability of unicast transmissions with a risk of reduced throughput.