IOT hardware and server communication process

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/switch_love_case/article/details/89367355

title: IOT hardware and server communication process
Tags: IOT
DATE: 2019-4-17 23:53:00


Hardware and server communication process

Preface:

CITC-iot IOT platform to support the current mainstream of things protocol, while a variety of products and projects already in operation, have achieved a high concurrent data communication and storage. Currently supported protocol: MQTT, COAP, HTTP, etc. This article focuses on communication processes explain this platform supports hardware and servers.

Existing platforms protocol analysis summary:

From the Top: mainstream IOT cloud platform supports all major protocols are MQTT agreement. Other agreement or narrow the scope of use or use complicated or complex docking hardware.
Therefore, this platform is still in the support base iot MQTT protocol, while also supporting COAP, HTTP and other protocol (other protocols under construction), the completion of Things multi-protocol docking.

data collection:

Data acquisition hardware is to rely on a variety of sensors to complete the acquisition sensor determines the master MCU acquisition process, the industry's multi-sensor uses the following protocol is implemented:

  1. Industrial modbus485 collection
  2. I2C data collection
  3. Industrial analog acquisition (4-20mA)
  4. CAN Bus Data Acquisition
  5. Single bus data acquisition

MCU master type

概述:
MCU作为硬件的主控,进行数据的读取与简单的分析以及数据校验,另外也负责了整个硬件系统的工作以及进程管理,例如:温湿度采集系统的工作,从485协议的温湿度探头读取到数据,进行CRC校验,进而计算出数据值,发送给通讯模组(NB或者WIFi、4G),同时MCU还管控着整个系统的流程、以及时钟、另外也作为系统故障的检测与处理的角色。
目前使用的MCU的型号如下:
 STM系列:
STM32F407、STM32F103、STM32F030
 Arduino系列:
Arduino uno R3、Arduino mega2560、Arduino mini
 ESP系列(同时可作为通讯模组):
ESP01、ESP12F、ESP32

通讯模组类型:

概述:
通讯模组作为硬件系统的传输层,把MCU发来的数据点,通过特定的协议(MQTT、HTTP、COAP)发送到云服务器,同时内部芯片里面集成了传输需要的通讯逻辑与时钟调配。
目前测试的通讯模组型号如下:
 WIFI模组:
ESP01、ESP12F、ESP32
 NB模组:
高新兴物联ME3616、中移M5311、SIM7000C
 4G模组
SIM7600

通讯协议类型

 MQTT:
MQTT协议是一个面向物联网应用的即时通信协议,使用TCP/IP提供网络连接,能够对负载内容实现消息屏蔽传输,开销小,可以有效降低网络流量。这也是目前主流的物联网通讯协议
 COAP
由于物联网中的很多设备都是资源受限型的,即只有少量的内存空间和有限的计算能力,所以传统的HTTP协议应用在物联网上就显得过于庞大而不适用。 IETF的CoRE工作组提出了一种基于REST架构的CoAP协议。COAP的使用并不是太广泛,但是他占用的资源是非常的小的。
 HTTP
超文本传输协议(HTTP,HyperText Transfer Protocol)是互联网上应用最为广泛的一种网络协议。所有的WWW文件都必须遵守这个标准。设计HTTP最初的目的是为了提供一种发布和接收HTML页面的方法。1960年美国人Ted Nelson构思了一种通过计算机处理文本信息的方法,并称之为超文本(hypertext),这成为了HTTP超文本传输协议标准架构的发展根基。Ted Nelson组织协调万维网协会(World Wide Web Consortium)和互联网工程工作小组(Internet Engineering Task Force )共同合作研究,最终发布了一系列的RFC,其中著名的RFC 2616定义了HTTP 1.1。

IOT项目工作流程:

A data acquisition:
by a sensor (e.g., temperature and humidity sensor) environment or the device status acquisition value, chip handles the communication format used in industry, for example: 485,0-5V, 4-20MA, while internally generate the necessary data validation, prepare for the MCU to process data.
Two, the MCU processing transmission and reception:
the MCU active or receiving inquiry data points collected by the sensor, after the necessary data has been verified, a simple processing of data, such as: filtering, conversion, etc., for further data packet, encapsulation module into a format suitable for communication, for example: MD5 encrypted binary conversion, data integration.
When the issued command communication module to receive the return will be parsed and control hardware to perform related actions, such as: the sleep device, the device self-test.

Third, the communication module data push
communication module (NB, 4G, WIFI) packaged MCU receives data, using the chip support communication protocols to transmit data to a specified IP server, while also receiving a command issued by the server, forwarding to the MCU to execute the command.
Fourth, the server receives:
the server receives the data sent from the hardware device and decrypted checksum, queue, or push data to the database cache, the front-end user interface display displaying, for example: a large-screen monitor. Also receive an instruction sent by a user, the message will be sent to the MCU controlling device to perform further actions.

Summary:
Currently CITC-IOT platform for data transmission and communication protocols are used in the industry mainstream standards, some of the projects in strict accordance with national standards of data transmission protocol, but also developed some unique communication protocols and standards, to cope with the rapid development and verification equipment, more protocol support is still under construction, and more projects are also being docked.

Guess you like

Origin blog.csdn.net/switch_love_case/article/details/89367355