MQTT Publish Subscribe

From Lantronix Wiki!
Revision as of 01:48, 18 November 2014 by Vlkd2103 (talk | contribs) (Created page with "=== Introduction === The sample application demonstrates how two PWXC HSPA+ devices connected to a cloud service can send/receive messages between each other.<br> With “pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

The sample application demonstrates how two PWXC HSPA+ devices connected to a cloud service can send/receive messages between each other.

With “paho-mqtt” python packaged installed, HSPA+ can easily connect to a cloud service. The MQTT protocol is a machine-to-machine (M2M) connectivity protocol. With the lightweight publish/subscribe messaging transport, it is very useful for connections when the devices are in remote locations. In this demo, one of the devices has a switch connected to its digital input with DC power while the other one has an LED connected to its relay. By turning the switch on the device to on or off, we can alter the state of LED of the other device.