# A Novel Intelligent IoT System for Improving the Safety and Planning of Air Cargo Operations
## 2 System Description
### Human-Machine Interface (HMI)  
ULD-HMI communication protocol: The communication between a ULD and the HMI is achieved through the message queuing telemetry transport (MQTT) protocol. It is a lightweight, public-subscribe network protocol that transports messages between devices. It usually runs over TCP/IP and is designed for connections with remote locations where a \"small code footprint\" or limited network bandwidth is required [40]. In the RMC system, the electronics board located inside the ULD functions as an MQTT broker, collecting requests from several HMI clients and routing the appropriate messages to each one of them. As referred to in [40], every ULD using predefined credentials communicates with the available HMI. Final MQTT credentials are autogenerated according to a predefined hash algorithm and an encryption token. The next step is the ULD reconnection to MQTT using the last credentials. The replacement of sensitive data with randomly generated data can secure the platform from hackers' attacks and data theft. Tokens cannot be reversed independently of the platform. Security checks and requirements for identity verification also prevent token exchanging. To enhance the security of the ULD system, the communication is based on an MQTT Ack-encryption key exchange, that occurs between the ULD and HMI. The exchange of the key and the establishment of the communication is taking place only after the connection to HMI's MQTT server is successfully achieved with preconfigured static settings. Human-machine interface (HMI): All actions performed by the HMI application are executed locally and through the device's local network. A local database was created using SQLite to address communication with the aircraft containers (ULDs) and the robotic platforms (RP). The HMI application was developed using Xamarin. Forms (28.0.0.3) [42] to cover the main operating systems running on mobile devices (Windows, iOS, Android). Figure 4 presents the developed system's use cases, upon which the HMI application design was based. Moreover, the platform's major interconnected entities and their roles are further explained in the following:  
* Application user. The user of the HMI application can control the MQTT server's state (active/inactive) and modify its details such as its IP and communication port, the data visualization for RPs and ULDs, and the operation of the robotic platform, according to the predetermined pipeline. * Robotic platform. The robotic platform is responsible for connecting, transporting, loading, and locking ULDs. It can connect to the application's MQTT server, interact with the user by following predefined steps in its pipeline, and connect to ULDs assigned to it. * ULD. The ULD is responsible for data retrieval from the sensors placed inside the container. It can connect to the application's MQTT server and transmit data from its sensors to the server. A typical screenshot of the HMI application's dashboard, where an overview of all the connected ULDs is summarized, is presented in Figure 5. As shown, the locking pin sensors are shown in red because no locking pin is near any sensor or touches one. Figure 4: HMI application use cases illustration. For each ULD sensor state report, a specific color representation has been selected for the most effective visualization of the measured data in the HMI application, as presented in Figure 6. Specifically, if the value of a magnetic sensor is above a predefined threshold, the indicator for the corresponding sensor is depicted in green in the application, as is the case for magnetic sensors 3 and 4 in Figure 6 (left). If it is under the threshold, the sensor is displayed in red. For the piezoelectric sensors: when the value of a piezoelectric sensor is above a threshold that can be set via the application, the indicator for the corresponding sensor is red. If it is under the threshold, the respective indicator is green.