Summary
In this chapter, we have seen examples of some popular IoT connectivity protocols. To connect a device to the internet, we need a networking infrastructure in the first place. Wi-Fi is the one for ESP32. We learned how to connect ESP32 to a Wi-Fi network and how to provision it if there is no Wi-Fi network configured. ESP-IDF provides several different ways to do this. After having a Wi-Fi connection, we can communicate with other devices on the network. MQTT is a many-to-many IoT communication protocol with a central broker that connects clients.
We installed Mosquitto as the MQTT broker on a machine in the local network and developed an application on ESP32 to subscribe and publish to the MQTT topics. REST is another common method for IoT communication. We can run a RESTful server on ESP32 or use ESP32 as a client that consumes a RESTful service. We developed applications for both use cases.
The upcoming chapter will explain how to develop secure applications on...