# A Novel IEEE 802.15.4e DSME MAC for Wireless Sensor Networks
## 3 The Proposed DSME MAC
### A New Channel Access Scheme
Also the channel remains busy, if the tagged device performs the first CCA during the acknowledgment waiting time \(T_{ACK}\) of another device. One solution to reduce the channel busy is to increase the duration of the backoff period of a sensor. However, by doing so, the network performance like transmission delay will be increased and fairness may not be maintained. Besides, it could be possible that a node may still assess the channel busy during the transmission of ACK by other nodes. For example, as shown in Figure 3, node \(B\) assesses busy channel, when node \(A\) transmits the ACK packet to the coordinator. If the backoff period is increased, it will be applicable for all devices and accordingly, node \(B\) can have same problem, when the ACK transmission is going on in the medium. However, our proposed mechanism can avoid this problem as a node has to adopt two idle slots after its first CCA and by that time ACK transmission if any can be completed. Figure 3: A new CCA scheme for IEEE802.15.4e to avoid channel busy due to ackdodgement. Figure 2: A new beacon frame for IEEE802.15.4e. The tagged device can transmit the data packet and waits for the acknowledgment, if the channel is found idle during the second CCA. After the \(T_{ACK}\) time is out, if the device does not receive the acknowledgment, it assumes that collision might have occurred in the channel and therefore repeats the procedure. The detailed procedure of our proposed scheme is given in Algorithm 3. ```
0:\(NB=0,BE=macMinBE,RT=0,\sigma=20\ symbols,T_{CCA}=8\ symbols\), \(CCB=0\ or\ 1\) and packet duration time \(T_{D}\). 0: Transmission success/failure. 1:\(\Delta=2\times T_{CCA}\ +\ 2\times\sigma\ +\ T_{D}\)
2:if Beacon received then
3: Calculate the \(CAP_{index}\) and wakeup at start of the \(CAP_{index}\);
4:else
5: Wait for beacon;
6:endif
7: Generate a random backoff time \(R_{b}=random(0,\ 2^{BE-1})\times\ \sigma\);
8:if\(((R_{CAP}\leq\Delta)\) or \(CCB=0)\)then
9: Wait for next superframe and go to step 2;
10:else
11: Perform CCA1 after \(R_{b}\) duration;
12:if Channel found busy then
13: Switch to sleep state for the \(random(0,T_{D})\) and go to step 30;
14:else
15: Wait for \(2\sigma\) and perform CCA2;
16:if Channel found busy then
17: Switch to sleep state for \(T_{D}\) and go to step 30;
18:else
19: Start transmission;
20:if Transmission failure then
21:\(RT=RT+1\);
22:if\(RT\leq MAX_{RT}\)then
23: Go to step 7;
24:else
25: Transmission failure;
26:endif
27:endif
28:endif
29:endif
30:\(NB=NB+1\), \(BE=min(BE+1,macMaxBE)\);
31:if\((NB>MAX_{NB})\)then
32: Transmission failure;
33:else
34: Go to step 7;
35:endif
36:endif
37:endif
```  
**Algorithm 3** New channel access scheme. According to IEEE 802.15.4e enabled star topology, all devices need to be associated with a single coordinator. Accordingly, all devices can have right to access the channel simultaneously and, as a result, collisions may occur. However, in our proposed scheme, devices are distributed to different superframes during their channel access mechanism so that less number of devices can access to the channel as compared to the IEEE 802.15.4e standard and therefore can minimize the collisions. Thus, our proposed mechanism can be suitable even in the large scale network.