# ScienceIoT: Evolution of the Wireless Infrastructure of KREONET
## 3 ScienceLoRa: IoT Infrastructure for Science Research and Education
### Network Protocol and Web-Based Management  
End-to-end communication (i.e., between a ScienceLoRa-Device and an external user) is divided into two parts: data collection through LoRa/LoRaWAN and data distribution; this is shown in Figure 7. The data collection part is based on the LoRa/LoRaWAN standards to ensure that ScienceLoRa might accommodate other standardized end devices and gateways. Moreover, ScienceLoRa provides programmable interfaces for ScienceLoRa-Device and ScienceLoRa-Gateway. Accordingly, users can customize networking parameters such as bandwidth, channel, and modulation/encoding schemes to enhance their network performance or to investigate wireless networks. By contrast, the data distribution part is composed of TCP/IP connections and the message queuing telemetry transport (MQTT) protocol. Users can register their gateways and devices through the web interface and monitor real-time data through MQTT.  
Figure 6: The hardware platforms for ScienceLoRa.  
As mentioned above, the data distribution part is further divided into two subparts. First, ScienceLoRa exploits the MQTT protocol for real-time data monitoring. MQTT is commonly used for transporting small IoT data and it provides publish-and-subscribe messaging based on a hierarchy of topics. In ScienceLoRa, the topic contains the user ID and MAC address of the device to ensure the correct end-to-end connection. Second, ScienceLoRa provides registration, management, and data sharing through the web interface. In addition to the network server, ScienceLoRa includes a database and a web server for management and data sharing services. The web server allows for the registration and management of users, registration of gateways and end devices, condition monitoring of the devices, real-time data monitoring, and configuration of QoS policies. Moreover, the historical data (i.e., not real-time but previously accumulated data) can be provided to the user via the web interface. To this end, the database includes management information, such as user ID, GW ID, sensor ID, and health information of the devices, and also historical data, including the type and location of the sensors, sensor data value, and sensor data generation time. Figure 8 shows the web-based user interface of the (a) ScienceLoRa-Network server and (b) ScienceLoRa-Gateway.  
In terms of network management, as shown in Figure 7, there are two types of communication links: Secure SHell (SSH) links and LoRaWAN control links (i.e., through LoRaWAN MAC Command). To directly manage the web server, database server, networks server, and gateways, the SSH tunnels are established between the administrator and each entity. Through the management links, the administrator can check hardware status, update network configuration, manipulate collected data, and collect operational logs. On the other hand, the logical LoRaWAN control links are required for managing ScienceLoRa-Devices because a direct TCP/IP link cannot be established. Along the control links, the administrator and a LoRaWAN device exchange LoRaWAN MAC commands. The hardware status and communication parameters (i.e., DR, SF, uplink/downlink channels, and security) can be configured with the control links.  
Figure 7: Network and management protocols for ScienceLoRa.  
Figure 8: Web-based management system of ScienceLoRa.