Playing with AT cmd(ESP-01) - CIPSEND but not getting any response after SEND OK

am just trying to familiarize myself with using the basic AT commands, but cannot get any response from a website;

i tried the example from this post but failed;

OK
AT+CIPMUX=1


OK
AT+CIPSTATUS

STATUS:2

OK
AT+CIPSTART=0,"TCP","api.weathermap.org",80

0,CONNECT

OK
AT+CIPSEND=3,76                     // my ID error

link is not valid

ERROR
AT+CIPSEND=0,76

                                   // entered text exactly as per post above (plus \r\n\r\n at the end)
OK
> n\r\n

busy s...

Recv 76 bytes

SEND OK

but nothing came through (like in the example).

i tried the same on a very simple website just to see what results come through, but i get a ‘bad request’ response.

This is the URL i tried to process;
http://www.blinkenlichten.info/print/origin.html

AT+CIPCLOSE=0

0,CLOSED

OK
AT+CIPSTART=0,"TCP","www.blinkenlichten.info",80

0,CONNECT

OK
AT+CIPSEND=0,79


OK
>                         // i parsed the above URL this way;
                           -->>  GET /print/origin.html HTTP/1.0\r\nHost: http://www.blinkenlichten.info\r\n\r\n

busy s...

Recv 79 bytes

SEND OK

+IPD,0,311:HTTP/1.1 400 Bad Request
Server: nginx
Date: Sat, 25 May 2019 03:33:20 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
0,CLOSED
AT


OK

i think i must be missing a command or parameter somewhere ?

could someone point me in the right direction ?
Thanks !

you call AT+CIPSEND=0,79 and then AT firmware replies with OK and >
then AT firmware expects 79 bytes after >

Juraj:
you call AT+CIPSEND=0,79 and then AT firmware replies with OK and >
then AT firmware expects 79 bytes after >

ok - i’m really n00b at this.
so it has to be exactly 79 bytes or it won’t work ?
i count (in spreadsheet) that what i typed after the ‘>’;

GET /print/origin.html HTTP/1.0\r\nHost: http://www.blinkenlichten.info\r\n\r\n

has 79 characters.

is that syntax correct ?

BabyGeezer:
ok - i'm really n00b at this.
so it has to be exactly 79 bytes or it won't work ?
i count (in spreadsheet) that what i typed after the '>';

GET /print/origin.html HTTP/1.0\r\nHost: http://www.blinkenlichten.info\r\n\r\n

has 79 characters.

is that syntax correct ?

remove http:// from the host name

Juraj:
remove http:// from the host name

argh - i should have noticed that...

still getting the same bad request though.
(already changed to CIPSEND=0,72)

also tried changing HTTP/1.0 to HTTP/1.1

is this message;

+IPD,0,311:HTTP/1.1 400 Bad Request
Server: nginx
...

coming from the ESP or from the server i'm trying to connect to ?

FWIW:
i tried that example again to weathermap.org
no Bad Request - but nothing was returned either.

0,CLOSED
AT


OK
AT+CIPSTART=0,"TCP","api.weathermap.org",80

0,CONNECT

OK
AT+CIPSTATUS

STATUS:3
+CIPSTATUS:0,"TCP","185.53.178.8",80,47217,0

OK
AT+CIPSEND=0,76


OK
> n

busy s...

Recv 76 bytes

SEND OK
AT


OK

400 is http response code. it is send from the server if the request is not a valid http request

you can’t send \r\n over Serial Monitor. it is not converted

send 3 lines from Serial Monitor
GET /print/origin.html HTTP/1.0
Host: http://www.blinkenlichten.info
and an empty line

or write a sketch which sends the commands

Juraj:
400 is http response code. it is send from the server if the request is not a valid http request

okay, and then the ESP prints out that message based on the 400 code ?

Juraj:
you can’t send \r\n over Serial Monitor. it is not converted

send 3 lines from Serial Monitor

i see - thank you for your patience;

still no success though;

OK
AT+CIPSTART=0,"TCP","api.weathermap.org",80

Link type ERROR

ERROR
AT+CIPMUX=1

IPMODE must be 0

ERROR
AT+CIPMODE=0


OK
AT+CIPMUX?

+CIPMUX:0

OK
AT+CIPMUX=1


OK
AT+CIPSTART=0,"TCP","api.weathermap.org",80

0,CONNECT

OK
AT+CIPSTATUS

STATUS:3
+CIPSTATUS:0,"TCP","185.53.178.8",80,6447,0

OK
AT+CIPSEND=0,73


OK
>                                        // i sent the 3 lines separately as you had typed
Recv 73 bytes

SEND OK

+IPD,0,311:HTTP/1.1 400 Bad Request
Server: nginx
Date: Sat, 25 May 2019 09:26:42 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
0,CLOSED
AT


OK
AT+CIPSTART=0,"TCP","api.weathermap.org",80

0,CONNECT

OK
AT+CIPSEND=0,74


OK
>                                         // this time i sent the 2 lines and two empty lines
busy s...

Recv 74 bytes

SEND OK

no Bad Request - but nothing returned either …

could you suggest another simple URL to try ?

got through at last !
Thanks so much.

again i forgot to take out the http://
:open_mouth: