# DCO-MAC: A Hybrid MAC Protocol for Data Collection in Underwater Acoustic Sensor Networks
## 4 Proposed DCO-MAC Protocol
### CT-MAC Protocol  
The CT-MAC is a contention-based MAC protocol using the handshaking mechanism for channel reservation. In the beginning of the transmission phase of the level-2 sub-network, the level-2 nodes with data packet(s) to be transmitted send the RTS packet to the reserve channel. After receiving an RTS packet successfully, the level-1 node broadcasts an INVITE packet to respond to the received RTS packet and invite other level-2 nodes in the same sub-network to join in the transmission process. To avoid the collision, the level-1 node calculates the time period between the INVITE packet sending and the NOTICE packet receiving, according to the propagation delay between the level-1 node and level-2 nodes, \(T_{\text{\_W\_TOTICE,k}}\). In addition, the time period between the INVITE packet sending and the NOTICE packet receiving are included into the INVITE packet. Receiving the INVITE packet, the level-1 node \(k\) with data packet(s) to be transmitted sends the NOTICE packet after waiting a period, \(T_{\text{\_W\_TOTICE,k}}\), to guarantee that the NOTICE packets are reaching the level-1 node at the pre-scheduled time. After receiving all of the NOTICE packets, the level-1 node calculates the time period between the ORDER packet sending and the DATA packets receiving, from the level-2 nodes that have transmitted a NOTICE packet, \(T_{\text{\_W\_DATA\_J}}\), and broadcasts an ORDER packet including these calculated time periods. Receiving the ORDER packet, the level-2 nodes with the data packet(s) to be transmitted send the DATA packet(s) after waiting a period, \(T_{\text{\_W\_DATA\_J}}\), so as to guarantee that the DATA packet(s) are being received by the level-1 node at the pre-scheduled time. Finally, after receiving all of the data packets, the level-1 node broadcasts an ACK packet. Figure 5 illustrates the process of data transmission in CT-MAC protocol. Figure 5: The process of data transmission in the contention-based MAC (CT-MAC) protocol. In a level-2 sub-network, receiving an RTS packet from one of the level-2 nodes with data packet(s) to be transmitted, the level-1 node pre-schedules the transmission of the NOTICE packets from the level-2 nodes. The time period between the INVITE packet sending and the NOTICE packet receiving can be calculated in the same way as the time period between the RTR packet sending and the ATS packet receiving in the RSV-MAC protocol. As shown in Figure 5, the receiving order of the NOTICE packets is A\({}_{1}\)\(\rightarrow\)A\({}_{4}\)\(\rightarrow\)A\({}_{3}\)\(\rightarrow\)A\({}_{2}\). The time period between the INVITE packet sending and the NOTICE packet receiving from node \(k\), \(T_{\text{wrt\_NOTICE},k}\), can be calculated as follows:  
\[T_{\text{wrt\_NOTICE},k}=T_{\text{wrt\_NOTICE},\text{A}_{1}}+(O_{\text{NOTICE },k}-1)(\theta+T_{\text{guard}}),k\in\{\text{A}_{2},\text{A}_{3},\text{A}_{4}\} \tag{5}\]  
where \(O_{\text{NOTICE},k}\) denotes the transmission order of the NOTICE packet from node \(k\). The time period between the INVITE packet sending and the NOTICE packet receiving from the mobile node A\({}_{1}\) is \(T_{\text{wrt\_NOTICE},\text{A}_{1}}=2\tau_{\text{max}}+\theta\). The total receiving period of the NOTICE packets at node A is \(T_{\text{r\_NOTICE},\text{A}}=T_{\text{wrt\_NOTICE},\text{A}_{2}}+\theta+T_{ \text{guard}}\). The level-1 node in a level-2 sub-network (node A) broadcasts the INVITE packet containing the calculated time period between the INVITE packet sending and the NOTICE packet receiving. When receiving the INVITE packet, the level-2 node without a data packet to be transmitted keeps silent. Otherwise, the level-2 node with data packets to be transmitted extracts the NOTICE receiving time from the INVITE packet, and transmit the NOTICE packet to the level-1 node after waiting a period, \(T_{\text{w\_NOTICE},k}\). The NOTICE packet contains the number of data packets to be transmitted, \(\varphi_{k}\), at the level-2 node, \(k\).