## 3 Stanag 5066  
STANAG 5066 is a military communication standard (STANdard AGreement 5066), developed focusing on the optimization of low-throughput communications and low-reliability channels. It is one of the most common and widely used HF communications protocols for military applications. The HF communication channel is characterized by its harshness. It presents a high base noise, as well as selective frequency and Doppler effects. This channel has been traditionally limited to a 3 kHz channel bandwidth, which severely limits the maximum theoretical throughput of any HF link. STANAG 5066 standard defines a communication protocol focused on providing both efficiency and reliability to applications communicating using an HF channel. This standard defines its own reliability-enhancement mechanisms, codification, and data encapsulation. As it was presented in Section 1, project HERAKLES decided to use STANAG 5066 due to the reduced reliability of EM-based UWSN. STANAG 5066 definition divides the protocol into three well-differentiated layers, Subnetwork Interface Sublayer (SIS), Channel Access Sublayer (CAS) and Data Transfer Sublayer (DTS). SIS is the layer that handles the communication between applications and STANAG 5066 stack. Therefore, it is mandatory that applications using STANAG 5066 stack implement the SIS communication protocol defined by the standard. The SIS layer defines a list of encoding structures in which payload data, such as destination address and transmission mode, are encapsulated. These data inform the STANAG 5066 stack about how the information should be managed. In the same way, the STANAG 5066 stack informs the application layer about using the same SIS protocol, indicating the origin address, transmission mode, and other metadata [33]. STANAG 5066 protocol has two main features that should be remarked. The first feature is its extended data addressability that uses unique address assignation for each node, node group,or broadcasting. The allowed address range goes from 1 to 268,435,456 (00:00:00:01 to 0F:FF:FFF), whilst address zero is identified as the broadcast address. This means that up to 228 (more than 268 million) nodes with a unique address could be deployed. This feature guarantees with a high significance level that address collisions are essentially avoided. This characteristic is of high relevance in the underwater scenario in which STANAG 5066 stack is being proposed in project HERAKLES. The second feature is that STANAG 5066 standard defines two differentiated transmission modes: ARQ and NONARQ. Both ARQ and NONARQ modes use Cyclic Redundant Code (CRC) to identify the integrity of the received data. Furthermore, if the data payload is larger than a configurable amount of bytes, STANAG 5066 carries out data fragmentation into chunks with their CRC codes. Data reassembly is carried out also by the STANAG 5066 stack at the receiver side. The chunk size selected in this work was 100 bytes, based on previous analysis made by [PERSON] et al. [31]. ARQ transmission mode implements Selective Repeat ARQ techniques to perform the retransmission of packets that have been received with errors (or even not received), guaranteeing that information, when received, is sent to upper layers without errors. STANAG 5066 defines a handshake procedure between endpoints before any ARQ message is transmitted. This operation is automatically managed by STANAG 5066 stack, and it establishes a link between both sender and receiver. This link is considered to be active unless 30 minutes of inactivity are reached. The behaviour of the link creation and destruction is depicted in Figure 2.  
The process that an ARQ message follows is illustrated in Figure 3. A packet will be considered as lost if the link is unable to be created (as explained above), or if its corresponding acknowledge is not received. If the link is active, the queued messages are retransmitted until the link is declared as broken.