Issue with Web.Get - But WebViewer works (linking to an Arduino)


I'm fighting to make work the Web response. I always have the "Error 1101: Unable to get..."
I'm using my cellphone, with the AI Companin option. Not the emulator.

The block is pretty easy:


What is strange is with WebViewer works great, it receives fast the answer from the WebServer (Arduino with ESP8266).

The same if I go to the browser and enter the same URL:


I also receive the Get action from the Web component.

So I don't know what to try. I'm connected in the same Wifi network, and I know the code in server is fine because it answer fast the get from the browser and Web.Viewer.

Any Idea to help?


Can you turn off your phone's cell connection, so it only uses WiFi?

Your cell provider's ISP can't reach your local 192.168... address.

Done! and the issue remains.

WebViewer from my phone and Browser (from my PC and my Phone) works fine.
Get request from Web component reachs the WebServer.

What is the Home_date code?


I already try without "?" at the end. I'm using an specific caracther at the end to cut the string (msg) and make simple to answer specific data.

This is my arduino Code in that section:

          connectionId =; // Restar 48 porque la función read () devuelve 
          msg = Serial1.readStringUntil('?');
          ComSerial(connectionId, msg);    

void ComSerial (const int connectionID, String msg){
     Serial.print("\n Mensaje Recibido:");
     Serial.print("- fin mensaje\n");
     if (msg.endsWith("/val/Home_date"))
     webpage =  String(, DEC) + "/" + String(now.month(), DEC)+ "/" + String(now.year(), DEC);
     sendData("AT+CIPSEND=" + String(connectionId) + "," + webpage.length() + "\r\n", 1000, false);
     sendData(webpage, 1000, true);
     sendData("AT+CIPCLOSE=" + String(connectionId) + "\r\n", 1000, true); 
     sendData("AT+CIPCLOSE=" + String(connectionId) + "\r\n", 500, false);          

String sendData(String command, const int timeout, boolean debug)
    String response = "";
    Serial1.print(command); // Se envía el carácter de lectura a la esp8266
    long int time = millis();
    while( (time+timeout) > millis())
        char c =; // Lee el siguiente carácter.
    return response;

This is what I see in the Serial Monitor:


It's the same answer as the WebViewer and Browser that works.
The text between: "Mensaje Recibido:" and "- fin mensaje". Is for debug.

21:54 is the actual time, that I want to response to the GET.

What it's difference regarding WebViewer is the number before :GET
In Web= 178, in Viewer=551.

Try to get response from and see what happens.

if (msg.endsWith("/val/Home_date"))


if (msg.indexOf("Home_date") >= 0)

What model of ESP8266 do you have? ESP8266-1, ESP8266-12E?

Thanks for both answer!

@vknow360: I tried with and the Web1 receive the info perfectly. So the issue is on WebServer side.

@Juan_Antonio: I will try that, but in the last test I remove the if to answer date info, always. And it didn't work. My ESP8266: ESP01S.
Your example is with an 8288, I'm not using any ESP8266.Wifi library

I believe I have to answer in a different ways if it's WebViewer and a differente way if its Web. Because answering the same way to both, Get it's not working.


I was able to make it work!
the issue was regarding the answer structure. I change to this and it started working good:

 // HTTP Header
     httpHeader = "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\n"; 
     httpHeader += "Content-Length: ";
     httpHeader += content.length();
     httpHeader += "\r\n";
     httpHeader +="Connection: close\r\n\r\n";
     httpResponse = httpHeader + content + " "; // There is a bug in this code: the last character of "content" is not sent, I cheated by adding this extra space
     sendData ("AT+CIPSEND=" + String(connectionId) + "," + httpResponse.length() + "\r\n", 500, true);
     sendData (httpResponse,1000,true);
     //sendData ("AT+CIPCLOSE=" + String(connectionId) + "\r\n", 1000, true);

Thanks for the Help :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.