Cactus WIFI server only serves page once, sometimes twice

#1

I tried most example and they are working fine.
But Catus response only once and does not work anymore.
I only can see “busy p…” message
Please help me!

Setup command. Works ok

AT
AT+CWMODE=1
AT+CIPMUX=1
AT+CIPSERVER=1,80
AT+CWJAP=…
AT+CIFSR

loop

void loop() {
if(Serial1.find("+IPD,"))
{
delay(1000);

int connectionId = Serial1.read()-48; // subtract 48 because the read() function returns 
// the ASCII decimal value and 0 (the first decimal number) starts at 48
String webpage = "<h1>Hello</h1>&lth2>World!</h2><button>LED1</button>";
String cipSend = "AT+CIPSEND=";
cipSend += connectionId;
cipSend += ",";
cipSend +=webpage.length();
cipSend +="\r\n";
sendData(cipSend,1000,DEBUG);
sendData(webpage,1000,DEBUG);
String closeCommand = "AT+CIPCLOSE="; 
closeCommand+=connectionId; // append connection id
closeCommand+="\r\n";
sendData(closeCommand,3000,DEBUG);

}
}

Serial output

OK
AT+CIFSR +CIFSR:STAIP,“192.168.0.23”
+CIFSR:STAMAC,"18
Start Webserver 31
,277:GET / HTTP/1.1
Host: 192.168.0.23
Connection: keep-alivAT+CIPSEND=0,52
OK

Hello

&lth2>World!LED1 > SEND OK > AT+CIPCLOSE=0 0,CLOSED > OK > ,277:GET / HTTP/1.1 > Host: 192.168.0.23 > Connection: keep-alivAT+CIPSEND=0,52 busy p... >

Hello

&lth2>World!LED1 AT+CIPCLOSE=0 busy p... > ,404:GET / HTTP/1.1 > Host: 192.168.0.23 > Connection: keep-alivAT+CIPSEND=0,52 busy p... >

Hello

&lth2>World!LED1 AT+CIPCLOSE=0 busy p...
#2

I think the thread will work. Please have a look. But I recommend you try the espduino firmware. It’s great for arduino.

#3

espduino works perfectly on Cactus rev2. However, it does not support server host mode yet… :frowning: