MasterofProject
Mobile development RSS CSDN home> Mobile development

Create and run MQTT Mosquitto on Intel Edison

Published in11:23 2016-01-04| Time reading| sourceCSDN| ZeroArticle comments| authorCSDN

Abstract:One of the major characteristics of the Intel (R) Edison development board is, it can not only be compatible Arduino*, is also a Linux * single board computer to full access to draft the Arduino underlying Linux function.

brief introduction

One of the major characteristics of the Intel (R) Edison development board is, it can not only be compatible Arduino*, is also a Linux * single board computer to full access to draft the Arduino underlying Linux function.

In this series of blog, I will introduce various methods of Linux function integration to Arduino draft, and how to use the existing code to simplify the development of Internet of things.

First, we first construct a simple sensor node contains a temperature sensor, and a switch element, Guang Xianmin LED. Then, we use MQTT to publish the data to the internet. Node-Red analysis demonstrates some basic data, triggered activity and the command returns the sensor node.

Edison development board with the accompanying Linux distribution version from the Yocto project.Http://www.yoctoproject.org). Yocto is a small Linux kernel, designed specifically for embedded systems with limited resources.

MQTT

MQTT is a lightweight protocol designed specifically for machine to machine (M2M) communications. MQTT uses a publish / subscribe message forwarding model based on the TCP/IP protocol. The center of the MQTT protocol is a MQTT server or proxy that supports the publisher and subscriber access. Users can use mqtt to build a network of sensors, which all kinds of sensors are able to in the form of sensor and its unique news release sensor values. The brakes are able to subscribe to different messages in order to take measures accordingly. MQTT agent will handle the forwarding message from the publisher to the subscriber.

Sample:

Microprocessor a can read switch state and to "switch on" form of news and the switch state to publish an mqtt server. Somewhere on the Internet microprocessor B subscribe to the MQTT message "switch". Now, whenever the user triggers the switch, the microprocessor A will issue a message to the MQTT agent. The agent will forward the message to the subscriber list. When when the message is received by the microprocessor B will the content analysis, to determine the state of the switch, and the corresponding to turn on or turn off lights.

For more information about MQTT, please visitHttp://mqtt.org.

Yocto operating system is equipped with a RSMB Edison (Small Message broker Really) small MQTT agent. Unfortunately, we do not have a large number of MQTT client to test. In this paper, we will construct another MQTT agent Mosquitto, which is mainly aimed at the client side. In subsequent articles, we will use these clients to connect to the Arduino draft.

Construction of Mosquitto on Edison

Assume that the reader has installed the Edison development board, and understand the standard Linux operation.

View full text

top
Zero
tread
Zero