Chat freely about anything...

User avatar
By _tb
#6297 Hey guys! I need some help with my esp-01, I can't make a GET request with the AT commands.
I had try diferents sites but always got the same response, 400 bad request.

I can connect to my network and get an IP, but that's all.
I update my firmware version to 0018000902 and it's the same.

Code: Select allAT+RST


OK
ü! ¤§1ä)Mô1ä)Mô1¤ñ
[System Ready, Vendor:www.ai-thinker.com]
AT+CIPSTART="TCP","my-ip.herokuapp.com",80


OK
Linked
AT+CIPSEND=16

> GET / HTTP/1.1\r\n

wrong syntax

ERROR

SEND OK

+IPD,282:HTTP/1.1 400 Bad Request
Server: H3rr
Date: Sun, 04 Jan 2015 22:47:14 GMT
Content-Type: text/html
Content-Length: 138
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
</body>
</html>

OK

OK
Unlink


Any ideas? thanks!
User avatar
By _tb
#6309 I was using the arduino serial-monitor thing, now I try with realterm and it just works.
I guess it has something to do with the return and new-line, \r\n.
When I send this characters in the arduino serial I don't know if it's working right, pretty sure it's my fault :D
User avatar
By Tomer
#6315 You are sending an HTTP/1.1 request, according to the RFC it must include a "host" header, so it should be something like this:

GET / HTTP/1.1\r\n
Host: my-ip.herokuapp.com\r\n
User-Agent: test\r\n
\r\n