IoT Network Deep Dive

Abhijeet
8 min readJan 17, 2021

In my last article, I tried to give a gist of one of the many ways how a Secured IoT system could be deployed. In this article, I shall demonstrate another common way to secure your IoT Network by shielding it from the outer world.

I will also show, how web apps could interact with the MQTT broker which brings endless possibilities as raw sensor data could be accessed seamlessly in FrontEnd Apps.

The things I will be talking about are:

  • WebSocket protocol support for the Broker
  • Reverse Proxying the Broker

I will not be using something new, it’s the same Raspberry Pi IoT gateway, and a PC or Mac, that I have referred to in my previous articles.

Web-socket Protocol Support for MQTT Broker

NGINX as a reverse proxy for the MQTT Broker with WebSocket Support

MQTT is the most ideal IoT protocol for constrained devices as well as for unreliable networks. It’s the perfect way to send messages with very low network overhead. In the scenarios, where the devices need to communicate to the web apps on the cloud or mobile devices, MQTT natively cannot send and receive messages to the browser, e.g ChromeApp or on mobile phone.In that case, WebSocket protocol comes to the rescue. Wrapping up the MQTT protocol packets into the WebSocket packet enable the WebApps to leverage all MQTT features. The WebSocket…

--

--

Abhijeet

Linux Enthusiast, Embedded systems, Quick Learner, IoT Developer