## 3 Framework
### TDMA/CA MAC Protocol  
TDMA/CA (Time-Division Multiple Access with Collision Avoidance) is an hybrid protocol that combines TDMA and CSMA/CA approaches. TDMA/CA uses a synchronization module that divides time into cycles. Each cycle starts with a synchronization period, is followed by a period for each color, and ends with an inactivity period. During the synchronization period, all the nodes of the network are synchronized, and the color sequence is broadcast to each node. During the colored period of a color \(c\), only nodes of color \(c\) are allowed to send frames. Similarly, all the nodes having a one-hop neighbor of color \(c\) are listening. The other nodes sleep. During the inactivity period, all the nodes sleep. The cycle organization is represented on Figure 4. On this example, color slots are sequenced according to a decreasing order and they all have the same duration. The novelty of TDMA/CA resides in the medium access mechanism used during each colored slot. The mechanism is based on the two following facts:  
* As SERENA reduces the possibility of color conflicts, the probability of frame collisions is limited. Thus, the nodes should transmit frames immediately, without having to wait for a backoff. * As SERENA cannot guarantee that there is no color conflict (such conflicts can occur due to propagation condition changes or node mobility), there should be a collision detection mechanism. The medium access mechanism used by TDMA/CA in each colored slot acts as follows. When a node decides to transmit a frame, it waits for its colored slot. Then, it first attempts to transmit the  
Figure 4: Cycle with the active period and the inactive one. frame without backoffs. If it receives an acknowledgement, from the receiving node, the transmission was successful (and in this case, the medium is used efficiently as there was no unnecessary backoff). However, if the sender does not receive an acknowledgement from the receiving node, TDMA/CA assumes that there has been a collision due to a color conflict. In this case, the sender attempts to retransmit the frame with a random backoff, similarly to the IEEE 802.15.4 standard. At the end of the backoff, the sender performs two CCAs in order to ensure that there is no other node transmitting. If it detects activity on the channel, the sender draws a backoff in a larger window. For each transmission attempt, the backoffs are randomly chosen within ranges \([0;W_{i}]\), where \(i\) denotes the number of times the channel was detected busy, \(W_{0}=0\) and \(W_{i+1}=\min\{2W_{i},64\}\). If the channel is detected busy more than five times, or if there has been more than five transmission attempts, the frame is dropped by TDMA/CA. TDMA/CA has the following properties:  
* If there is no color conflict and no frame loss, frames are transmitted immediately (that is, without backoffs). * If there is no color conflict but frame losses, frames are transmitted with a small backoff, as with CSMA/CA. * If there is a color conflict, frames can still be received but at the cost of a throughput reduction as backoffs are added. TDMA/CA is therefore able to adapt to the quality of the node coloring given by SERENA. In Section 5, we describe another interesting feature of TDMA/CA: its ability to notify SERENA of color conflicts. Note that SERENA is not notified of color conflicts after the first loss of an acknowledgement frame, as this could be caused by the propagation conditions, but rather after several consecutive frame losses. In this paper, we assumed that the traffic distribution is balanced among all the nodes. Heterogeneous traffic has an impact on the performance of our method. If a node does not have enough time during its time slot to send its data, it has to wait for its next time slot, which introduces significant delays. This issue can be dealt with in the following ways. * The assignment and duration of time slots is achieved by a centralized entity (which is the coordinator of the PAN).