-->
Page 3 of 5

Re: 400 Bad Request on CIPSEND long string

PostPosted: Tue Oct 13, 2015 11:30 am
by Asadujjaman
thanx @Rafeal, actually i am trying to send some data to a web browser, and i am using Arduino IDE (1.6.5 r2). For sending data to a web server i used AT commands on serial monitor of Arduino IDE, those are my commands

AT

OK

AT+RST

OK
@fÌ8ÇÿYbBÈ@6ÆôˆVÊØB÷+BD€!Ïÿ©C¡HÈU¹‘½Ééwww.ai-thinker.com

SDK Version:0.9.5(b1)
Compiled @:Dec 25 2014, 21:50:58
ready
AT+CWJAP="asad_wifi","18532013"

OK
AT+CIPSTART="TCP","shotlu.usrs0.com",80
CONNECT

OK
AT+CIPSEND=75
> GET /receiver.php?apples=56&oranges=23 HTTP/1.1\r\nHost: shotlu.usrs0.com\r\n\r\nbusy s...

SEND OK

+IPD,168:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>hosting</center>
</body>
</html>

OK
CLOSED

OK


i cannot understand why this happened, do you know anything about this?

Re: 400 Bad Request on CIPSEND long string

PostPosted: Tue Oct 13, 2015 11:46 am
by Rafael R
Hi @Asadujjaman

That's the problem
AT commands on serial monitor of Arduino IDE


The serial monitor of Arduino IDE send only 64 characters.

Give a look into this link:

http://forum.arduino.cc/index.php?topic=244398.0

Let me know if it works.

Best regards

Re: 400 Bad Request on CIPSEND long string

PostPosted: Tue Oct 13, 2015 11:49 am
by Rafael R
Do not forget

AT+CIPMUX = 0

to turn your ESP8266 to single connection.

Re: 400 Bad Request on CIPSEND long string

PostPosted: Tue Oct 13, 2015 12:11 pm
by Asadujjaman
So as you said serial monitor buffer size is 64, so this time i sent 60, but still i am getting this 400 bad request :(
AT+CWJAP="asad_wifi","18532013"

OK
AT+CIPSTART="TCP","shotlu.usrs0.com",80
CONNECT

OK
AT+CIPSEND=54
> GET /rec.php?a=56 HTTP/1.1\r\nHost: shotlu.usrs0.com\r\n\r\nbusy s...

SEND OK

+IPD,168:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>hosting</center>
</body>
</html>

OK
CLOSED

OK