Diaoul / arduino-ESP8266

An Arduino library to manage the ESP8266.
MIT License
68 stars 46 forks source link

wifi.send(unsigned int id, String) always returns TIMEOUT #22

Closed madprogrammi closed 9 years ago

madprogrammi commented 9 years ago

I'm trying to send a String through a multi-connection instance of the ESP8266 class. When I Serial.print(getStatus(wifi.send(id, sendable))); it returns "TIMEOUT" every time. The data is never received by the client. After defining the ESP8266_DEBUG macro, the serial output looks like:

AT+CIPSEND=0,7
busy
TIMEOUT

Where the first two lines are from the ESP8266 library, and TIMEOUT is the output of getStatus();. This code is run in a loop once the client sends a handshake, so I know that the link is up. Any ideas?

Diaoul commented 9 years ago

Use a longer timeout with setTimeout. It defaults to 1s which may be too short.

madprogrammi commented 9 years ago

I had mine set at 3s. Does it need to be longer?

taoyuan commented 9 years ago

Which version of your esp8266 firmware ? We use 0.94.

madprogrammi commented 9 years ago

No idea - AT+GMR just responds "OK"

taoyuan commented 9 years ago

@madprogrammi Try this firmware.