Getting ERROR 1101 in app when trying to get response from NodeMCU

I made an App to get data from NodeMCU and display in the App.Am getting an error saying 'ERROR 1101: Unable to get Response from specified URL:http://192.168.43.235.

I have attached the App inventor BLOCKs and as well as App ERROR messages screenshots for reference.

Thanks in advance.block error in app

Try this:
http://kio4.com/arduino/347B_esp8266_AI2_Potenciometro.htm

(This card is similar to NodeMcu (ESP8266), but it has the dimensions and shape of Arduino UNO.)

hi ,

thank you for your reply.
I followed the link you have shared …i did not understood ,can you explain. what is issue in my App inventor blocks ?

I don’t know what your code is in the NodeMcu.
The code that I indicated worked for me.
Upload it to the NodeMcu and see if it works for you.

A 192.168.x.x IP address will be on the local network, and will be only visible if your phone is connected via WiFi to the local network. If your phone only connects through your wireless carrier, it can’t see local addresses like that.

@pavan_pavan Could you explain us about your code on the NodeMCU side?
Which libraries are you using in the NodeMCU code?
Are you trying to create a simple HTTP server using NodeMCU?
In that case, are you sending back response using the appropriate methods within the libraries?

Thanks for your replies …please find the answers for the above questions .

Could you explain us about your code on the NodeMCU side?
I have added the NodeMCU code below .

Which libraries are you using in the NodeMCU code?
ESP8266WiFi.h from the website http://easycoding.tn/

Are you trying to create a simple HTTP server using NodeMCU?
Yes , am trying to create simple HTTP server using NodeMCU

In that case, are you sending back response using the appropriate methods within the libraries?
Yes ,am sending back response .

Hoping to get solutions at the earliest … Thanks in advance :slight_smile:

NodeMCU code :
#include <ESP8266WiFi.h>
WiFiServer server(80);
void setup()
{
Serial.begin(9600);
pinMode(16, INPUT);
WiFi.disconnect();
delay(3000);
WiFi.begin(“Albert Einstein”,“Albert@007”);
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);

}
Serial.println(“connected .My Ip is :”);
Serial.println((WiFi.localIP().toString()));
server.begin();

}
void loop()
{

WiFiClient client = server.available();
if (!client) { return; }
while(!client.available()){  delay(1); }
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("");
client.println("<!DOCTYPE HTML>");
client.println("<html>");
client.println(digitalRead(16));
client.println("</html>");
client.stop();
delay(1);

}

Your code works for me.
Check your Serial Monitor.

I repeat it with minor modifications.

#include <ESP8266WiFi.h>
WiFiServer server(80);
void setup()
{
Serial.begin(9600);
pinMode(16, INPUT);
WiFi.disconnect();
delay(3000);
WiFi.begin("Nombre_red","contraseña");
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);
}
Serial.println("Conectado. My IP is:");
Serial.println((WiFi.localIP().toString()));
server.begin();

}
void loop()
{
if(WiFi.status() != WL_CONNECTED){
WiFi.begin("Nombre_red","contraseña");
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);
}   
  }
  
WiFiClient client = server.available();
if (!client) { return; }
while(!client.available()){  delay(1); }
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("");
//client.println("<!DOCTYPE HTML>");
//client.println("<html>");
//client.println(digitalRead(16));
//client.println("</html>");
client.println(random(100)); // ADDED
client.flush(); // ADDED
client.stop();
}

Thank you Juan_Antonio for your reply .

I tried your code as well , App is not receiving the values from NodeMCU getting same error but am able to see the value in the browser.When i try to read the values by typing the IP adress in broswer .

I dont know what is happening , I tried in 3 different mobile phone ended in getting same error message in the App.

I have attached the screenshots for reference .

![browser|563x340]
browser

your device is in airplane mode?

one of device was in airplane mode , but it is connected to same WiFi network . Where as other 2 device was not in airplane mode ,but I still face same issue .

1 Like

What information do you get on the Serial Monitor?

personal information removed

personal information removed, please use PM or ask here in the community

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.