Chat freely about anything...

User avatar
By rant
#31416 When i do this :

Code: Select allAT+CIPSEND=0,20
OK


and get the ">" sign , i then type to send this :
Code: Select allHTTP/1.1 200 OK\r\n


what i see on the terminal is this : (my http command is not seeing after the ">" )


Code: Select allOK
>
busy s...



but check what happens if i do this with length of 18 :

Code: Select allAT+CIPSEND=0,18
OK
> n
busy s...
Recv 18 bytes

SEND OK



(now i see part of the message after the ">" )

and for length 10 i get more letters from my command ! ( ?? )

Code: Select allAT+CIPSEND=0,10
OK
> 00 OK\r\n
busy s...
Recv 10 bytes
SEND OK




What is going on here ?????
User avatar
By smorg
#31440 I think that is the correct behavior. Look at the examples from the SDK:
Code: Select allSend data:
AT+CIPSEND=4 // set date length which will be sent, such as 4 bytes
>DGFY // enter the data, no CR
Response :SEND OK
Note: If the number of bytes sent is bigger than the size defined (n), will reply busy, and after
sending n number of bytes, reply SEND OK.

You told the module to send 20 bytes, then gave it the string "HTTP/1.1 200 OK\r\n" (which has 19 characters), which were sent.
When you only specify 18 bytes, it will send the first 18 characters, returning the 19th, which is "n".

And if you try to send a newline combination "\r\n" will probably not be converted. I do not think "\" works as an escape sequence in CIPSEND, it is just sent as it is.
User avatar
By martinayotte
#31451 Yes ! The AT shell command is not dealing with escape characters, so you need to be careful with that, especially if you are in a terminal such Minicom or TeraTerm, you can not send \r\n, you need to send Ctrl-M+Ctrl-J as they are the characters for CR+LF. The "\r\n" string sequence are escape in C/C++ from Arduino sketch as well as other scripting language such python.
BTW, with the following python command, we can clearly see that the request shown/discussed above has a length of 17 characters, not 20 netiher than 19, but 17 :
Code: Select allpython -c "print len(\"HTTP/1.1 200 OK\r\n\")"
17