International Core Journal of Engineering 2020-26 | Page 182

parsed and stored in a private cloud database. and Bluetooth. The sensors such as temperature and humidity, smoke sensing, and human body induction are connected under the security sensing node, and control units such as Led lamps and relays are connected. Start No Node and coordinator authentication Yes Node data upload No Yes Gateway reveives data Classification and packaging No Fig6. IoT Gateway Test Environment Deployment Establish vpn Yes B. Functional Verification and Results The Internet of Things server uses Apache to build a web service. The environment status information collected by the sensing node is written into the server database. The user can view the environmental information such as temperature and humidity and smoke detection remotely by logging in to the webpage. Integrated remote control and one-button security function, can remotely control the working state of the device, set the security mode, in the security mode, when the environment has abnormal information, the user can receive a message reminder. Secure transmission Data decryption Protocol resolution Data storage Finish Fig5. Data protection process V. P ERFORMANCE T ESTING AND F UNCTIONAL V ERIFICATION A. Test Program The IoT gateway test environment was built in the LAN for verification of gateway functions and performance. The test environment deployment is shown in Figure 5.1. As a normal router, the gateway connects the wired network and wireless network devices in the home. At the same time, it acts as a coordinator to connect the sensor network, receive information such as temperature and humidity, smoke, and human body sensing in the sensor network, and control the lighting of the home, the opening and closing of the curtain, and the switching of the door. In addition, the gateway is also a small VPN client, which supports the establishment of a secure tunnel between the IoT server and the real-time synchronization of the sensor network data to the IoT server database. On the other hand, it also supports other remote access routers. The secure access is well suited to remote access needs. Fig7. User Interface The gateway WAN port is connected to the public network, and the LAN port is connected to the LAN host. PC2 is used to verify connectivity to the IoT server after the VPN tunnel is established. The Internet of Things server is built on the Ubuntu system. The server has two network cards. The network card 1 is connected to the public network, and the network card 2 is connected to the local area network. Set up a WEB server (remote view or control sensor network device), FTP server, and PC1 (to test server and gateway connectivity) in the LAN connected to the IoT server NIC 2. The security-aware nodes and gateways in the sensor network are connected by different methods such as Zigbee Fig8. Exception message reminder The following figure shows the process of authenticating a gateway with a server. Identity authentication is mainly for the verification of digital certificates of both parties. The digital certificate here is the digital certificate of SM2-with- SM3. Before sending the certificate to the server, the gateway first uses the public key of the CA to verify the local certificate. After the verification is passed, the user certificate is sent to the server, and the certificate request is sent to the server. After receiving the peer certificate, the server verifies 160