0

I have been trying for 2 days to find a solution to this 400 error. Before I just got 408 and I managed to sort that out and now I get an 400. I'm using these commands through the Serial Monitor. The Arduino Sketch is Blank and every time i try to write code using Serial.println or using "SoftwareSerial.h" liberty i get the print in the serial monitor but my ESP8266 does not respond to the code

AT


OK
AT+RST


OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 212, room 16 
tail 4
chksum 0x5e
load 0x3ffe8000, len 788, room 4 
tail 0
chksum 0x1c
load 0x3ffe8314, len 72, room 8 
tail 0
chksum 0x55
csum 0x55
jump to user1

ready
AT+CIPSTART="TCP","apexmorphs.co.uk",80


OK
Linked
AT+CIPSEND=70

> GET /inc/cron/tank.php?temp=30\r\n HTTP/1.0\r\n Host: apexmorphs.co.uk\r\n

busy s...

SEND OK

+IPD,187:HTTP/1.0 400 Bad request
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>

OK

OK
Unlink
AT+CIPSTART="TCP","http://apexmorphs.co.uk",80

DNS Fail/r/nAT+CIPSTART="TCP","apexmorphs.co.uk",80


OK
Linked
AT+CIPSEND=77

> GET /inc/cron/tank.php?temp=30\r\n HTTP/1.0\r\n Host: http://apexmorphs.co.uk\r\n

busy s...

SEND OK

+IPD,187:HTTP/1.0 400 Bad request
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>

OK

OK
Unlink
  • remove \r\n before HTTP/1.0. add one more \r\n at the end. use HTTP/1.1 – Juraj Jun 27 '20 at 12:30
  • AT+CIPSTART="TCP","apexmorphs.co.uk",80 OK Linked AT+CIPSEND=71 > GET /inc/cron/tank.php?temp=30 HTTP/1.1\r\n Host: apexmorphs.co.uk\r\n\r\n busy s... SEND OK +IPD,187:HTTP/1.0 400 Bad request Cache-Control: no-cache Connection: close Content-Type: text/html

    400 Bad request

    Your browser sent an invalid request. OK OK Unlink
    – Nathan Witten Jun 27 '20 at 12:47
  • it is more then 71 characters. you should not have "busy s..." it is triggered by the characters over 71 count. – Juraj Jun 27 '20 at 13:40
  • I used a char counter then took away 2 for every \r\n – Nathan Witten Jun 27 '20 at 13:42
  • Try removing the space between `\r\n` and the following parameter. Ps: `busy s..` means that the send is in progress. – Roberto Caboni Jun 29 '20 at 16:55

0 Answers0