-->
Page 1 of 1

TCP Client ISSUES (GET REQUEST)

PostPosted: Wed Mar 29, 2017 12:07 pm
by arunpaul
Using PUTTY,when i send GET request from ESP8266 i m always getting reply as 400 bad request.Here is my AT commands.PLEASE HELP.
AT+CIPMUX=1

AT+CWJAP="arun","arun1234"

AT+CIPSTART=4,"TCP","54.251.98.159",80

AT+CIPSEND=4,68

GET /testurl/sample.php?deviceid=5444541 HTTP/1.1Host: 54.251.98.159

After sending this GET request reply as 400 BAD request.

Re: TCP Client ISSUES (GET REQUEST)

PostPosted: Wed Mar 29, 2017 3:04 pm
by martinayotte
According to :
Code: Select allGET /testurl/sample.php?deviceid=5444541 HTTP/1.1Host: 54.251.98.159

You are missing "\r\n" between "HTTP/1.1" and "Host: 54.251.98.159" and also missing the "\r\n\r\n" at the end.
Using interactive PUTTY to try that out could be problematic with AT firmware.
Better try using python script, or simply forget about AT firmware and use better firmware such Arduino.