Error 1101 in MIT App using esp32

I made an application to obtain different values from ESP32 and display them in the application. I'm getting an error saying 'ERROR 1101: Unable to get the response from the specified URL' and I can't find anywhere to resolve it, I've tried many things.
My code for App Inventor:

Command sent through the browser:

Esp32 serial port:

The error presented in the application:

I wanted to write on the label Status! if the LED was ON = ligado or OFF = desligado.

The code in esp32:

#include <WiFi.h> 

#define led1 2
//string de mensagem enviada pelo client
String ClientRequest;
//IP estático, de preferencia conectar ESP32 e smartphone na mesma rede
IPAddress staticIP(192,168,15,70);
//Gateway, colocar o gateway da rede em que está conectado
IPAddress gateway(192,168,15,1);
//Máscara, colocar a máscara da rede em que está conectado
IPAddress subnet(255,255,255,0);
//Porta de COM server/client
WiFiServer server(80);
// Wi-Fi Client
WiFiClient client;
//variável usada para solicitar o client 
String myresultat;
String ReadIncomingRequest()
  //Enquanto houver dados enviados pelo client 
    //Atribui para a variável string o comando enviado pelo client
    ClientRequest = (client.readStringUntil('\r'));
    //Se existir "HTTP/1.1" na string então recebe comando
    if ((ClientRequest.indexOf("HTTP/1.1")>0))
      myresultat = ClientRequest;
  //Retorna variável resultado
  return myresultat;
void setup()
  //Inicializa varíavel sem dados
  ClientRequest = "";

  WiFi.begin("Matheus", "12345678");
  while (WiFi.status() != WL_CONNECTED) //Enquanto não conectar exibe "."

  WiFi.config(staticIP, gateway, subnet); //Configura ip estático, gateway e máscara (definidos no início do código)
  Serial.println("Seu IP é");     //Exibe IP utilizado pelo ESP32

  server.begin();   //Inicia COM com servidor
void loop()
    client = server.available();
    if (!client) 
    //Enquanto nao existir COM com client aguardar
    //Obtem respostas utilizando a função local ReadIncomingRequest
    ClientRequest = (ReadIncomingRequest());
    //Retira dados da página e obtem apenas o comando enviado
    ClientRequest.remove(0, 5);
    if (ClientRequest == "on"){ 
      Serial.println("LED ON!");
    if (ClientRequest == "off"){
      Serial.println("LED OFF!");

Make sure your phone is working off the local router via WiFi, and not trying to connect through your cell phone carrier's Internet service, which does not see your local IP addresses.

They are all connected on the same network.

What happens if you add a WebViewer to your app, and send it to those URLs?

Could you tell me how I do it?

WebView should be in the same component pallette as Textbox, button, Label, etc.
Once you have it, its blocks are not that complex.

can it be like this?
It is showing what is written but it is still giving an error. I would like to put this value that is showing in a variable.

when I press ON this happens:

This means that I am receiving the values, but how do I put in a status variable.

I don't know why your web page is failing in the Web component, but I am hopeful on the WebView response. It shows you are getting through, but failing some Web formality.

The WebView component has a block to retrieve the Title of the page it receives, if you can figure out how to add such html to your web page.
There is also a JavaScript functionality to pass data both ways, if you want to wade deeper.

Here an example with ESP32 and WiFi

I will study my case better and see if the options presented will suit my project. As soon as I get a solution, I'll post it here, thanks.

I had the same problem.

I could connect fine if I did not setup a static IP in arduino code.

To get a static IP to work I had to change it:

From: IPAddress local_IP(192, 168, 1, 115);
To: IPAddress local_IP(192, 168, 0, 115);

It would work if I used 0, 115 or 2,115 but not with 1, 115

Try playing around changing the static IP numbers.


Thanks for the help, I managed to make it work with the same ip I was using.

I used as an example a project shown by Juan Antonio and it worked thanks!

I am currently having problems with the communication of another esp01 connected on the same network, I am working to resolve it.

I would like to thank everyone for their help, I solved my problem with changes to the esp code.

So what did you have the ESP send to satisfy the Web component?

I changed the loop this way:

void loop() {
if ((WiFi.status() != WL_CONNECTED) && (millis() > wait30)) {
Serial.println("Trying to reconnect WiFi...");
WiFi.begin(ssid, password);
wait30 = millis() + 30000;
WiFiClient client = server.available();
if (!client) {

Serial.print("New client: ");

String req = client.readStringUntil('\r');

   if (req.indexOf("on1") != -1) {digitalWrite(LED2, HIGH); estado = "LED RED ON";}
   if (req.indexOf("off1") != -1){digitalWrite(LED2, LOW); estado = "LED RED OFF";}
   if (req.indexOf("on2") != -1) {digitalWrite(LED4, HIGH); estado = "LED GREEN ON";}
   if (req.indexOf("off2") != -1){digitalWrite(LED4, LOW); estado = "LED GREEN OFF";}

client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");

Serial.println("Client disconnected.");

Comparing the two sketches, then,
I'm guessing these were the critical output header lines in the sketch that satisfied the Web component.

1 Like

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