I want to use ESP8266 as server and computer as client, and send data from the server only when the client is connected, The ESP8266 wifimode is set to AP mode.
Please help, need urgent...
![]()
I want to use ESP8266 as server and computer as client, and send data from the server only when the client is connected, The ESP8266 wifimode is set to AP mode.
Please help, need urgent...
![]()
You didn't get the architecture correctly: The server doesn't send something to the client but the client is requesting a resource from the server and the server only responds to this request. If you see that difference your problem disappears immediately.
pylon:
You didn't get the architecture correctly: The server doesn't send something to the client but the client is requesting a resource from the server and the server only responds to this request. If you see that difference your problem disappears immediately.
Ok, lemme guess, I'll have to find a way to the client be waiting a response from the ESP, right? Since you only said it does..
Ok, lemme guess, I'll have to find a way to the client be waiting a response from the ESP, right? Since you only said it does..
Wrong guess. The client doesn't have to just wait for a response, it has to actively request the information, otherwise there will be no response.
OP wanted to send information only if a client is connected. As the client has to request the information from the server, the server always knows that the client is connected as it received the request first.
You can "send" datas to client via server when client connects to server in HTTP payload under HTTP header.
Asad_Ullah019:
Arduino UNO + ESP8266 using cloud server
or Blynk or other similar service