Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using esp8266 to send a GET Request but I am getting 408 Timeout error.

Here is a screenshot of my output.

enter image description here

share|improve this question
1  
I only count 60 characters, but you tell it your going to send 69. – Gerben Apr 19 '16 at 18:06
    
@Gerben: I am getting error when I trying to use "AT+CIPSEND=60" – Se Fore Apr 19 '16 at 18:56
    
Are you sending actual "carriage return" and "new line" characters or just a \r\n string? Show us your code. – gre_gor Apr 19 '16 at 21:33
up vote 0 down vote accepted

I assume you're doing all this from the serial monitor. You can't use escape sequences like \r in the serial monitor entry box. Everything you enter is evaluated as a string of separate ASCII characters; \r is just a backslash character followed by lowercase r. To send a HTTP request, you make the serial monitor send the \r\n for you.

  • First set the serial monitor to BOTH NL & CR permanently; it will serve you well for commands and HTTP requests as it appends \r\n to everything you send.
  • Count the number of bytes in the your HTTP request, including the carriage return and newline characters. I count 61 characters in your request.
  • Use this count in AT+CIPSEND
  • Type the first line of your request, and stop right before the first \r\n, and click Send. Because of your setting, the monitor will now send what you typed with \r\n suffixed to it.
  • Type and send each line of the request, just like you sent the first line, until you've sent the last line.
  • Since there is an additional \r\n after the last line, you click Send again, without typing anything. And since the module requires \r to indicate the end of the data packet, you click Send one last time.

Hopefully, this should give you the right results.

share|improve this answer
    
woow! Thank you. – Se Fore Apr 20 '16 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.