A Serial over WiFi connection link can be setup using TCP Server
Free TCP for windows https://packetsender.com/
Or use a Web page JavaScript HTML5 WebSockets https://www.tutorialspoint.com/html5/html5_websocket.htm
Using the WiFiServer class
const uint ServerPort = 23;
WiFiServer Server(ServerPort);
void setup()
{
Server.begin();
}
Then Accepting ESP32 client connections
WiFiClient RemoteClient;
void CheckForConnections()
{
if (Server.hasClient())
{
// If we are already connected to another computer,
// then reject the new connection. Otherwise accept
// the connection.
if (RemoteClient.connected())
{
Serial.println("Connection rejected");
Server.available().stop();
}
else
{
Serial.println("Connection accepted");
RemoteClient = Server.available();
}
}
}
Sending Data to Remote Clients
#include "MegunoLink.h"
:
:
void SendHallValue()
{
if (RemoteClient.connected())
{
TimePlot HallPlot("", RemoteClient);
HallPlot.SendData("Magnetic Field", hallRead());
}
}
Receiving from Remote Clients
void EchoReceivedData()
{
uint8_t ReceiveBuffer[30];
while (RemoteClient.connected() && RemoteClient.available())
{
int Received = RemoteClient.read(ReceiveBuffer, sizeof(ReceiveBuffer));
RemoteClient.write(ReceiveBuffer, Received);
}
}
SEE https://www.megunolink.com/articles/wireless/talk-esp32-over-wifi/