0

I have a quite simple problem but I've still couldn't find a solution yet.

What I want to accomplish:

I'm trying to establish a reliable connection between a smartphone running Android and the ESP8266 wifi module. I would like to send short HTTP string messages, where the phone plays the role of a client and the ESP8266 of a server. For managing HTTP requests I'm using the Volley library.

What already works:

I am able to do a successful HTTP GET request to the ESP8266 from a browser running on the Android phone. I also managed to use Volley to make a GET request to a server running on the web.

What doesn't work:

On the other hand, I cannot successfully send a GET request to ESP8266 using Volley. To be more precise, I get an EOFException when the server (ESP8266) tries to close the connection after it has responded. When using a browser the body of the response gets displayed after the connection is closed but in case of Volley the connection closing fails and shuts down the server.

I have no idea how to solve this problem/bug. What frustrates me is that the same commands for sending a HTTP response on the ESP work well when using a web browser but fail when using Volley. So I guess the problem is something about Volley.

Any ideas why Volley throws such exception? Any help would be deeply appreciated.

Community
  • 1
  • 1
  • Are there any specific headers/parameters your sending to the ESP? What does the request that works look like vs the one using Volley? There may be a difference in which http client stack that volley uses vs the hard coded version. – Patty P Oct 28 '15 at 17:12
  • Hello Tanis. Both Requests are without a body or any string query. But there is a difference between the header parameters. To be more precise, the Google chrome version is reacher in information. But I think this is not the problem ... It's just the connection closing that causes an exception and shuts down the ESP. – Nejc Deželak Oct 28 '15 at 17:36

0 Answers0