Re: tcp client on Android, server on ESP as AccessPoint.
Posted: Wed Oct 07, 2015 1:10 am
Thank you again
You are right I am a bit lost with the syntax of arduino sketches...
My Android app is working well and I have even tested another one "Socket Protocol" (free on google Play)
Both are using classical sockets to communicate with tcp connection.
My code is blocking here on the client.read() instruction
and even worse, it never enters the client.available condition...
Finally my question is :
- once connected to client, how can I detect and read incoming data ?
- client is Android
- server is ESP8266
- ESP8266 being in AP mode
JP
You are right I am a bit lost with the syntax of arduino sketches...
My Android app is working well and I have even tested another one "Socket Protocol" (free on google Play)
Both are using classical sockets to communicate with tcp connection.
My code is blocking here on the client.read() instruction
and even worse, it never enters the client.available condition...
Code: Select all
if (client.available() > 0) {
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes to the serial
Serial.write(thisChar);
Finally my question is :
- once connected to client, how can I detect and read incoming data ?
- client is Android
- server is ESP8266
- ESP8266 being in AP mode
JP