Send from WiFi enabled STM32 with ESP32 to web browser

This section introduces an application that uses the ESP32 wireless module to put Nucleo (STM32) into wireless (WiFi) mode and send strings to a terminal on a PC or smartphone as a web server. The details of ESP32 and browser settings and sending/receiving are explained in "Remote control of WiFi enabled STM32Nucleo with ESP32 using a browser".

The application introduced here is a basic one that sends strings from Nucleo (STM32), which is WiFi enabled with ESP32 and configured as a web server, to the web browser of a client PC or smartphone. Once you have a solid understanding of the system and are able to use it, you will be able to apply it in a variety of ways.

It is basically the same as sending a TCP server. The wiring is also configured the same.

The application program configuration is basically the same as for the TCP server transmission.

The difference is that the port number is set to 80 for the web server when the server is created, and the HTTP protocol is followed when sending.
The response from ESP32 is set to a larger waiting time because the HTTP protocol returns a redundant string.

In the sample program, specifying the IP address of the WEB server from the web browser and then restarting the STM32 side with a reset often leads to a connection.

Follow me!