Abstract:With the rapid development of the information technology, the Internet of Things (IoT) technology has been widely used in all walks of life. One of the main applications is the collection and transmission of information from hardware devices. But there will be serious data security problems in the process of data transmission, so the study proposes a hybrid communication encryption method. From the perspective of IoT devices, the study also introduces the wireless communication technology of IoT and the CoAP protocol, and then uses the NB-IoT technology considering the resource constrains of IoT devices, and has implemented the method in smart gas system. The experimental results shows that the proposed method is feasible.