Arthur Vasilyev Arthur Vasilyev - 1 month ago 34x
Java Question

Sending data to ESP8266 Wi-Fi chip from Android device

I have a ESP8266 chip which is connected to the microcircuit. When chip gets value "200" the light is starting to blink 4 times and than it returns "100" value. I need to make an Android app using Java which will connect to the ESP8266 chip, send data to it and will get value "100". I don't know what library I should use to deal with it. Please, help me, how can I do that? I think it is not the most hard question here.


For your Controller you dont need any Libary. You just can use the serial AT Commands:

After setting up your ESP like this:

In your App you should deal with TCP-Sockets:

Try something like this in an async task:

socket = new Socket();
socket.connect(new InetSocketAddress(ip, port), Connect_Timeout);

DataOutputStream DataOut = new DataOutputStream(socket.getOutputStream());


So your ESP is the Server and the App the Client. This should work without problems.