# A Platform of Unmanned Surface Vehicle Swarms for Real Time Monitoring in Aquaculture Environments
## 4 Network Communication System  
The proposed platform has the capability to provide communication between devices by using simultaneously multi-communication technologies in a synchronized approach. The communication technologies in place are: LoRa, IEEE 802.11n (Wi-Fi) and Bluetooth, as illustrated in Figure 7.  
Figure 6: USV’s software architecture. **LoRa:** this is a long-range wireless communication system aimed to be used in devices where energy consumption is of utmost importance. This technology grants high communication ranges up to 6 Kms in our previous tests [31]. However, it provides low data-rates, complying with a very strict duty-cycle regulatory restriction. The regulations in the ETSI EN300-220-1 document establish diverse requirements for short range devices, mostly on radio activity, in which radio transmitters must adopt duty cycled restrictions. Generally, the transmitters are constrained to 1% duty-cycle, which means 36  s of use per hour, which is sufficient to meet the communication needs of the system. The platform uses small time windows, commonly five minute windows. This time window has been selected to ensure that, depending on the Time on Air (ToA) of data packets (which depends on the packet size and LoRa communication mode), each USV, Buoy and Mission Controller can send more than one data packet per window. In this way, it is possible to transmit multiple data packets in the same transmission window granted to a sending node, thus reducing the number of multimedia accesses per node. The LoRa communication mode for the devices is configured with the following properties: BW = 500 Hz, CR = 4/5 and SF = 12. Moreover, three seconds of the available window duty cycle allows a node to transmit more than 300 bytes. Therefore, as mentioned above, it is possible to transmit multiple data packets along with the required control packets. Each device capable of communicating through LoRa has a module responsible for handling the action of receiving and sending LoRa packets in a synchronized manner. This module takes into consideration the LoRa duty-cycle already mentioned above and it is set up in a way that it can sink a number of packets from the sending queue where the total sum of their length does not surpass a specified length, usually between 300 bytes and 400 bytes. Consequently, the LoRa communication will not be able to transmit packets through LoRa medium for at least 5 min approximately. The LoRa Libelium SX1272 module has a support library that manages the SX1272 LoRa module. The maximum length of a LoRa packet is 255 bytes, 5 of them are used by the fields described above. The LoRa packet payload includes a header of 8 bytes and the remaining 242 bytes are used to carry data payload. The header consists of the destination node address, source node address and packet type, as specified in Figure 8.  
Figure 7: Multi-technology networking overview. The MC sends a client request aimed to schedule USV missions, as well as to notify USVs to update their missions and furthermore update their sets of geographical points. Each request is originated by a client, is sent through the server and reaches the MC in a JSON Format, where it is mapped the following information: the type of the request, the numerical identification of the destined USV and a specific byte stream payload corresponding one of the illustrated in Figure 8. Having this data, the MC is able to parse the request and build a packet with a specific format, such as the shown in Figure 8, aimed to be used by packets that are sent through LoRa. Each USV's LoRa module works according to a MAC protocol for Multi-Gateway in LoRa based on Ready to Send(RTS), Clear To Send (CTS) and Control Clear to Send (CCTS) messages in order to deal with a multi-gateway environment, to ensure that only one of the DTS is ready to start receiving data packets originated by one of the USV [29].