2.3 Physical Layer and Medium Access Control Layer: IEEE 802.15.4
2.3.2 Channel Access Control
To manage the channel access in the beacon-less transmission and during the CAP, the IEEE 802.15.4 MAC layer implements a Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) mechanism. In the following the functional descriptions are restricted to the beacon-less transmissions.
Before sending data, a device senses the wireless channel for any other transmitting devices. This process is called Clear Channel Assessment (CCA). The sender only proceeds to the transmission phase, if the channel is found to be free. In IEEE 802.15.4, there are three different modes for CCA to decide when the channel is considered to be busy:
1. ‘Energy above threshold’ – CCA reports a busy medium, if energy is measured above a certain threshold. For the CC2420 Radio used in TelosB motes this would be by default -77 dBm [21].
2. ‘Carrier sense only’– CCA reports a busy medium, if it detects a signal compliant with the IEEE 802.15.4 standard, independent from the measured energy. 3. ‘Carrier sense with energy above threshold’ - CCA reports a busy medium if
an IEEE 802.15.4 signal is detected and an energy level above the threshold is measured.
If the channel is busy, the MAC layer initiates a backoff-timer and starts sensing the carrier again after its expiration. This backoff is by default a random time interval between 0 and 7 backoff units (BUs), each lasting 20 symbol durations (SD), corre- sponding to 320 µs at the default frequency of 2.4 GHz. Each consecutive time the CCA mechanism detects a busy channel state, the backoff interval is doubled. After several attempts (default = 4 [5]), the transmission is considered to be not possible and the packet is dropped. If the carrier sensing finds the channel to be available, the frame is transmitted.
The standard CSMA/CA mechanism used in IEEE 802.15.4 tries to avoid collisions in form of packet collisions by sensing the channel before sending and only allowing a node to send if the channel is found to be clear. However this is not a definitive solution, as there may be multiple nodes that find the channel idle and decide to transmit at the same time. If two nodes that are not in direct radio range (that means more than one hop away), sense the channel, for instance they will never find the channel busy if one of them is transmitting. Seeing the channel free, even though another node is transmitting could lead to a situation where transmissions collide at a third node which is trying to receive one of the transmitted frames. This is called hidden terminal problem and is shown in Fig. 2.4 and is one of the main causes for packet collisions
2.3 Physical Layer and Medium Access Control Layer: IEEE 802.15.4
in IEEE 802.15.4 networks. Nodes A and C may be transmitting at the same time to node B, as they both are not in each other’s transmission range and therefore will not find the channel busy, even if one of them is transmitting.
B C
A
Figure 2.4: Hidden terminal effect, where three nodes are involved.
On the contrary, the IEEE 802.15.4 CSMA/CA mechanisms may prevent nodes from sending data that would not collide in the exposed terminal situation. Figure 2.5 illustrates a setup for the exposed terminal problem to happen. Nodes B and C could prevent each other from sending data to A and D correspondingly, if they sense the channel busy, as one of them is transmitting. However, in this case it would not matter, if they transmit simultaneously, as the destinations A and D are lying outside of the transmission range of C and B, respectively.
B
A
C
D
Figure 2.5: Exposed terminal effect, where four nodes are involved.
In Enhanced-CSMA [22], a modified version of the CSMA mechanism used in IEEE 802.15.4, the hidden terminal effect is taken into account. As previously stated, the results of a CCA-scan at a sending node do not have to coincide with the results a CCA channel scan would provide at a receiving node. E-CSMA empirically generates success probability distributions per receiver and correlates it with the locally observ- able channel conditions at the transmitter. With this mechanism a balance between success probability with local queue drop probability is achieved, increasing the overall performance.
D D D D
D A
A Sender
Receiver
Send data packets until ACK received
Transmission detected D A Reception window Data packet ACK packet
Figure 2.6: RDC mechanism in ContikiMAC [1].
2.3.2.1 Radio Duty Cycling (RDC)
The beacon-enabled transmission mode coordinates devices in such a way that they can turn off their radio during phases of radio inactivity in order to save valuable energy, while assigning them slots during which they can transmit their data.
To reduce the energy consumption in beacon-less networks, a mechanism that is not specified in the IEEE 802.15.4 standard can be applied: RDC. Generally, in this operational mode, devices turn off their radio transceivers during large periods of time (for example 99% of the time, which equals a 1% duty cycle ratio). The transceivers are turned on periodically to check for a possible ongoing transmission. A sending device may transmit data at any time and requires mechanisms like a preamble or the repeated transmissions of the data packets to indicate that it wants to transmit data to other devices. The data packet then can be delivered to a receiver once it detects the preamble or the ongoing data transmissions in one of its duty cycles.
An example of this behavior is given in Fig. 2.6. It shows the basic RDC behavior used in the ContikiMAC [1] that is applied in some of evaluations carried out in this thesis. In ContikiMAC a sender repeatedly transmits a data packet until the receiver detects the ongoing transmission of the data packet during the periodically repeating listen periods. Once the ongoing transmission is detected, the radio transceiver of the receiver node is kept on until it receives the data packet and replies with an ACK. With the reception of an ACK, the sender node stops strobing the data packet and turns off the radio.
RDC is not compatible with the IEEE 802.15.4 MAC layer specification, yet it can be applied in networks with IEEE 802.15.4 PHY layer using an alternative MAC implementation. Apart from the ContikiMAC used as a MAC layer implementation that applies RDC, there exists a large variety of other MAC layer implementations for IEEE 802.15.4 networks, covering different approaches to RDC. A survey of possible approaches is done in [23] and methods for energy efficient implementations of protocols for constrained devices are summarized in [24].
2.3 Physical Layer and Medium Access Control Layer: IEEE 802.15.4