Bidrectional communication without Web Server
Posted: Fri Dec 07, 2018 5:49 pm
Hi,
I want to communicate 2 ESP01 modules (more in the future). Mi idea is to set one as Access Point and the others as Clients. I don't want to use a Web Server (unless there is no other way to do what I want or somebody tells me it's the way it should be done).
I'm using Arduino IDE and the ESP8266WiFi library.
I've already managed to send information from the Client to the Server by using:
and also to read it in the Server by using:
My problem is that I don't know hot to send info from the Server to the Client.
Any help will be great!
I want to communicate 2 ESP01 modules (more in the future). Mi idea is to set one as Access Point and the others as Clients. I don't want to use a Web Server (unless there is no other way to do what I want or somebody tells me it's the way it should be done).
I'm using Arduino IDE and the ESP8266WiFi library.
I've already managed to send information from the Client to the Server by using:
Code: Select all
cliente.println("< " + mensaje + " >"); // Para mandarlo al Servidor.
cliente.flush(); // Una vez terminado el envĂo, limpio el conducto.
and also to read it in the Server by using:
Code: Select all
String mensaje = cliente[i].readStringUntil('\r');
cliente[i].flush();
Serial.println("Client No " + String(i) + " - " + mensaje);
My problem is that I don't know hot to send info from the Server to the Client.
Any help will be great!