Internet of things communication: develop WIFI, Bluetooth, Lora, NBIOT, mesh networking and other communication methods in one day [with development routine]

Preface

The realization of communication development in the face of various Internet of Things is relatively complicated, and it is very difficult for many people to develop a communication method. If you want to successfully build and use WIFI, Bluetooth, Lora, NB and other communication methods within a day, it is unimaginable. But today I will show you how to develop these IoT communications with a powerful and simple Core IoT development board. The following are several commonly used IoT communications and routine links.

1. Wifi+mqtt access cloud platform

MQTT is a TCP-based Internet of Things communication protocol, which is widely used in the field of Internet of Things. Basically all cloud platforms support device access with MQTT protocol, so if your device supports MQTT connection, it can be easily connected Various cloud platforms (such as ONE NET, Alibaba Cloud, Tencent Cloud, etc.). The MQTT library function provided by CORE is also very simple. You only need to adjust the parameters passed in when calling the MQTT library function according to the rules of each cloud platform to connect to each cloud platform. Specific code routines used: WIFI routine details

2. Core communicates with mobile phones via Bluetooth

Now almost everyone's mobile phone has Bluetooth function, so if your hardware device also has Bluetooth communication function, then you can easily establish communication with the mobile phone, so as to have IOT Internet of Things attributes. But we also know that the Bluetooth Ble (currently developed to version 5.2) protocol is extremely complex, not everyone needs to understand it in detail, our more needs are enough to be able to use it. Core can customize our own Bluetooth device with just a few lines of code in just a few minutes, and based on core's "Development-Free App", we even save the work of mobile app development. Specific code example: Bluetooth example details
Insert picture description here

Third, Lora communication

Lora is not a protocol, but a radio frequency technology based on spread spectrum communication. Compared with other radio frequency technologies such as 2.4G or ordinary 433/915M, Lora has a longer transmission distance (several kilometers) and stronger Overcoming obstacles performance. So we take one Lora device as the central point, and multiple Lora devices as nodes can form a star network with a range of several kilometers. Specific code routines: Lora routine details
Insert picture description here

Four, NBIOT+mqtt communication

Narrowband Internet of Things (NB-IoT) has become an important branch of the Internet of Everything. NB-IoT is built on a cellular network and consumes only about 180kHz of bandwidth. It can be directly deployed on a GSM network, UMTS network or LTE network to reduce deployment costs and achieve smooth upgrades.
NB-IoT is an emerging technology in the IoT field, which supports the cellular data connection of low-power devices in the wide area network. It is also called low-power wide area network (LPWAN). NB-IoT supports efficient connection of devices with long standby time and high network connection requirements. It is said that the battery life of NB-IoT devices can be increased by at least 10 years, while also providing very comprehensive indoor cellular data connection coverage. NBIOT routine details

Five, Mesh networking

Core uses the COAP protocol based on the Thread wireless network at the bottom. In fact, it is a multipoint mesh network communication protocol, but the point-to-point communication in this example only implements two nodes.
By understanding the mechanism of the Thread wireless network, you should know that the nodes in Thread are divided into three categories: Leader, Router, EndDevice. But please do not confuse them with the concept of server and client in the COAP protocol. Because the server and client nodes in the Thread network may be any of Leader, Router, EndDevice, and they are not fixed, they will change with the dynamic changes of the network, and this also reflects the Thread network The strong point is that if a certain routing node in the network has a problem, other nodes in the network will dynamically adjust their roles to heal the network. Mesh networking routine details
Insert picture description here

Guess you like

Origin blog.csdn.net/x19823369540/article/details/110730693