Chat freely about anything...

User avatar
By Olaf
#16601 Hi Folks,
I'm new to the ESP8266 and am stuck with an issue:

I'm able to connect the ESP8266 to an AP (or set it as standalone) and set it up as a web server. When connecting to it via a client web browser (e.g. from an iPhone) the ESP receives the page request (see the log below) but none of the CIPSENDs seem to arrive back at the client. Instead of seeing a webpage on the client I just get the spinning circle and the message "Safari could not open the page because the server stopped responding".

I tried four different web server examples, all with the same result.
I'm using the ESP01 with F/W 0.9.2.4

Any help would be greatly appreciated.
Thanks,
/Olaf



Start

reset the module
AT+RST

OK
�����v��p!������
[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready
-----
Change to station mode
AT+CWMODE=1
no change
-----
Connect to a network
AT+CWJAP="MyAP","***MyPW***"
-----
Get the ip address assigned by the router
OK
AT+CIFSR
192.168.2.148
OK
-----
Set for multiple connections
AT+CIPMUX=1
OK
-----
Start the server
AT+CIPSERVER=1,80
OK
-----
Waiting for page request
Connect to 192.168.2.148

Link

+IPD,0,351:GET / HTTP/1.1
Host: 192.168.2.148
Accept-Encoding: gzip, cept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D201 Safari/9537.53

OK
-----
AT+CIPSEND=0,25
>
-----
<html><head></head><body>
SEND OK
-----
AT+CIPSEND=0,26
>
-----
<h1>ESP8266 Webserver</h1>
SEND OK
-----

...etc...
User avatar
By Olaf
#16745 I finally solved it and am posting the solution in case others run into the same problem:

For some reason I have to first send "\r\n" via CIPSEND. Without doing that all sent data is ignored despite the positive "SEND OK" acknowledgments from the ESP.