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

The strange fact that we are facing is, the AT command is now accepting the URL and parameters provided (earlier we were coming across "Error: 400 Bad Request"), but the URL is NOT HIT even after \n being included in the command. We are clueless at the moment on how to HIT the URL as it's the API which is going to increment the counter in the database, which is not happening even after successful command execution.

AT+CIPSTART="TCP","www.mydomain.com",80

**CONNECT**
**OK**

AT+CIPSEND=115

OK

GET /api/mywebapi.php?param1=01\r\nHTTP/1.1\r\nHost:mydomain.com

**busy s...**

**Recv 115 bytes**

**SEND OK**
**CLOSED**

** Denotes output of the AT commands.

share|improve this question
    
I've only played with this way of working with the ESP very briefly, but I notice your CIPSEND is expecting 115 bytes, and you're sending much less than that (60 by my count). Probably not related, but careful with your \r and \n - I think it will sent an actual ` and r`, rather than a linefeed. – Mark Smith Jan 6 at 11:17

Your GET is incorrect. You have a CRLF between the GET and the HTTP. It should just be a space.

GET /blah/blah/blah HTTP/1.1\r\nHost: BlahBlah.com\r\n\r\n

Of course the \r\n shouldn't be those specific individual characters, but the ASCII codes 13 and 10 respectively, so printing each line with Serial.println() instead of inserting \r\n might be better.

share|improve this answer

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.