
Explore how ESP32 wifi lessons enable data exchange between devices and a PC over a router using protocols like TCP/IP, UDP, MQTT, and HTTP.
Explore the ESP32 wifi flow in soft ap mode, from app core to lwIP and wifi driver, including ap start and event handling of station connections.
Learn to implement a tcp client on the ESP32 with the lwIP tcp ip stack and BSD sockets API, including creating, connecting, sending, receiving, and closing sockets for server communication.
Compare UDP and TCP: UDP is connectionless, faster, and supports multicast, while TCP is reliable and connection-based, suitable for email, FTP, and HTTP.
Explore the ESP32 UDP client workflow, including configuring host IP and port, creating a socket, sending a payload to the UDP server, receiving responses, and reconnecting on reset.
Implement a udp server on the esp32 over wifi, using socket operations to bind, receive from, and send back data while displaying the client ip and port.
Learn the http protocol to build an ESP32 http server and enable browser control. Understand requests and responses, including request lines, headers, bodies, methods get and post, and status codes.
Demonstrates the http url structure, including protocol, user info, domain or ip, port, path, query string, and anchor, and shows how the browser uses urls to fetch pages.
Explore how to implement an ESP32 http get handler, parse request headers and url query strings, and return dynamic pages based on id and number parameters.
Learn how to implement the http put method on the ESP32, sending data to a web server and processing responses with a put function, including testing via Chrome developer tools.
learn how to perform http requests on the esp32 to fetch data from a web server, build the http get request, and parse the http response for weather data.
learn how the websocket upgrade uses an http handshake and a 101 code to establish a persistent, two-way data stream for real-time communication.
Explain how the ESP32 WebSocket server performs the handshake, detects the protocol version, exchanges keys, and upgrades the connection, enabling the receive and send of data.
Learn how the webOS SOC server 02 processes received data from handshake to payload decoding, handling frame types (continue text, binary, ping pong) and unmasking into memory buffers.
Learn how the WebSocket server constructs and sends data frames, using http ws send frame async and a queue, then handles framing, payload length, and session sending.
Explore browser-based and ESP32 WebSocket clients that communicate with a server, including handshake, opening connections, sending data, and handling incoming messages.
Discover how the ESP32 websocket client reads server data by running the webOS client on the device, exploring the workflow, event handling (connected, data, error), and timer usage.
Explore how a websocket client uses timers and semaphores to manage data transmission, timeouts, and graceful shutdown in an ESP32 workflow.
Explore MQTT, a lightweight IoT protocol for publish/subscribe messaging, using topics to move sensor data between devices and servers with quality of service levels 0 to 2, persistence, and security.
Implement an ESP32 MQTT client that publishes data to a server every 5 seconds and subscribes to the same topic, with MQTT event handling and a timer callback.
Explore the eclipse mosquitto mqtt server for esp32 projects, highlighting its open source, lightweight design, and mqtt protocol support, with testing on a public online server.
Explore ESP now, a connectionless wifi protocol that merges the first five tcp/ip layers into one, reducing code, cpu usage, and power while enabling 500 meters unicast, multicast, and broadcast.
Explore the ESP Now data frame format for ESP32, covering the mac header, frame body with category code and vendor-specific fields, and the frame control with a 250-byte payload.
Learn how to obtain the ESP32 base MAC address for ESP-NOW communication and how to read MAC addresses for wifi station, Bluetooth, and soft AP using the IDF SDK.
Initialize ESP now on the ESP32, add a paired device, and prepare to send data with a target MAC address. Monitor send status via callbacks and respect the 250-byte limit.
Implement the ESPNow receive data flow on the ESP32 by adding the receive data function, setting up the receive callback, printing received data, and compiling and flashing the board.
This course focus on ESP32 WIFI communication based on the following protocols: TCP, UDP, Http, WebSocket and MQTT.
All the code has been tested on ESP32_idf_sdk_ver4.4.1. In the videos, we use the command line compile environment to compile and test the code.
(1) For TCP, we discuss the ESP32 lwIP socket TCP work stand flow from both the server side and the client side. And demo how to communicate ESP32 device with the computer TCP server software or the computer TCP Client software.
(2) For UDP, we discuss the difference between the TCP and UDP, and compare the work flow of UDP with TCP work flow, and also we program the ESP32 device with UDP code, demo it how to communicate with PC UDP software.
(3) For Http, we discuss every detail about the Http protocol, including http get, post, put, request methods, and demo how we run the code on ESP32 board to get web page data through the different methods from internet.
(4) For WebSocket, we discuss why we need the websocket and the websocket data format, and demo how the websocket work from the websocket server, the websocket script and the websocket client.
(5) For Mqtt, we discuss the Mqtt protocol, and demo how the Mqtt works on ESP32 from the client and server side.
(5) For ESPNow, we discuss the espnow protocol, data format and demo how to send, receive and broadcast data by using espnow.