Chat freely about anything...

User avatar
By rant
#31400 Please any idea !

We have set the esp as a server(access point) and we send data to it from a browser/mobile phone.
Everything works great till the point where the esp has to send back the respond .
So, we send a GET request to the esp, and he always get the request, ,but the browser/mobile is not getting his respond.

Here we set it as a server with :

Code: Select allAT+CIPMUX=1
OK
AT+CWMODE=3
OK
AT+CIPSERVER=1,80
OK
AT+CWSAP="myname","mypass",5,2
OK


The browser then connects to "myname" and send a get request :

http://192.168.4.1/setx:sety

the esp gets it and try to send a respond :

Code: Select allAT+CIPSEND=0,47
> HTTP/1.1 content \r\n Content-Type:text/xml\r\n


The respond is not seen by any browser! also tried
Code: Select allHTTP/1.1 200 OK \r\n
.
Nothing is successful .


Please, any idea ????
User avatar
By rant
#31411 Hi thanks,

First of all , i dont think its a length problem because it sends the request , i get "send ok" ..
Second, why 43 ? did you remove the \r\n ? but i have them twice .. how exactly do you count this number ?
Third , if i send long responds, and send them multiple times, they do arrive to the browser back.
Could you try that with a simple browser and see that it cant be done ?

:(
User avatar
By Barnabybear
#31414
rant wrote:Hi thanks,

First of all , i dont think its a length problem because it sends the request , i get "send ok" ..
Second, why 43 ? did you remove the \r\n ? but i have them twice .. how exactly do you count this number ?
Third , if i send long responds, and send them multiple times, they do arrive to the browser back.
Could you try that with a simple browser and see that it cant be done ?

:(

\r (CR) & \n (NL) are the visual representations of the Ascii characters 13 & 10, as such they only count as one character. You had 4 in the string so the total length of the string needs to be reduced to 43.