• Initialising Status
    Initialising App
    Initialising File
    Initialising Code
    Initialising Serial

  • Have you set the baud rate up? It should be 115200 for ESP8266

  • Hi @user79559,

    • first you connect over serial with baud rate 1152000 COM14

    Device found {"bitrate":115200,"bufferSize":4096,"con­­nectionId":5,"ctsFlowControl":false,"da­t­aBits":"eight","name":"","parityBit":"­no­","paused":true,"persistent":false,"r­ece­iveTimeout":0,"sendTimeout":0,"stopB­its"­:"one"}
    [success] Connected to .\COM14
    Connected to .\COM14

    • send some code

    Found a prompt... great!

    Sending...
    ---> "\u0010reset();\n\u0010var ESP8266 = require(\"ESP8266\"),\u001b\n wifi = require(\"Wifi\");\n\u0010\u001b[4dfunct­­ion onInit() {\u001b\n wifi.connect(\"LP82K1\", {password: \"excitedboat325\"}, function(err) {\u001b\n if(err)console.log(err);else {\u001b\n console.log(\"wifi connected!\");//116\u001b\n print(wifi.getIP().ip);\u001b\n\u001b\n }\u001b\n });\u001b\n}\n\n"
    Splitting for reset(), delay 250
    Sent
    Disconnect callback...
    WARNING: [notify_warn] Disconnected
    Disconnected
    Connecting...
    Set Slow Write = true
    Connected [object Object]

    • try to connect via telnet

    Device found {"socketId":5}
    [success] Connected to TCP/IP: 192.168.0.121:23 (No response from board)

    Connected to TCP/IP: 192.168.0.121:23 (No response from board)

    Please share what you try to achieve, so someone might point you to documents or code snippets to support you.

  • var settings_pol = 20;
    var settings_kondey = 24;
    var last_temp = 0;
    var temp_pol = 0;
    var dalas = setInterval(function() {
       require("DS18B20").connect(new OneWire(D13)).getTemp(function (temp) {
        print("Temp is "+temp+"°C");
        if(temp!==null){
        if(temp<settings_pol)digitalWrite(D14, true);
        if(temp>settings_pol)digitalWrite(D14, false);
          temp_pol = temp;
        } else digitalWrite(D14, false);
      });
    }, 10000);
     function start_sensor(){
    var dht_senso = setInterval(function() {
      require("DHT22").connect(D12).read(funct­ion (a) {
        print("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());
        if(a.temp != -1){
        if(a.temp>(settings_kondey+0.3))digitalW­rite(D4, true);
        if(a.temp<settings_kondey)digitalWrite(D­4, false);
    
         // if(a.temp!=last_temp){
          setTimeout(function () { mqtt.publish("test", "{\"temp\":"+a.temp+",\"hum\":"+a.rh+",\­"temp_pol\":"+temp_pol+",\"settings_kond­ey\":"+settings_kondey+",\"settings_pol\­":"+settings_pol+"}");},1000);
         //   last_temp = a.temp;
         // }
        }else digitalWrite(D4, false);
      });
    }, 5000);
    }
    var server = "192.168.0.182"; // the ip of your MQTT broker
      var options = { // ALL OPTIONAL - the defaults are below
        client_id : "random",   // the client ID sent to MQTT - it's a good idea to define your own static one based on `getSerial()`
        keep_alive: 60,         // keep alive time in seconds
        port: 1883,             // port number
        clean_session: true,
        //username: "home",   // default is undefined
        //password: "789456",   // default is undefined
        protocol_name: "MQTT",  // or MQIsdp, etc..
        protocol_level: 4,      // protocol level
      };
      var mqtt = require("MQTT").create(server, options /*optional*/);
    function reboot(){
     print("reboot...");
     ESP8266.reboot();
    }
    var ESP8266 = require("ESP8266"),
         wifi = require("Wifi");
    //var ssid = "Electrolux";
    //var options = {password: "12345678"};
    function onInit() {
       setTimeout(reboot,18000000);
       wifi.stopAP();
       //wifi.startAP(ssid, options);
       //wifi.startAP("Electrolux");
      // wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) {
         wifi.connect("LP82K1", {password: "excitedboat325"}, function(err) {
            if(err)console.log(err);else {
              console.log("wifi connected!");//116
              print(wifi.getIP().ip);
      mqtt.on('connected', function() {
        mqtt.subscribe("settings");
        print("mqtt connected!");
        start_sensor();
      });
      mqtt.on('publish', function (pub) {
        console.log("topic: "+pub.topic);
        console.log("message: "+pub.message);
        var settings=[];
        if(pub.topic==="settings")settings = JSON.parse(pub.message);
        settings_pol = settings.settings_pol;
        settings_kondey = settings.settings_kondey;
      });
      mqtt.connect();
      mqtt.on('disconnected', function() {
      console.log("MQTT disconnected... reconnecting.");
      setTimeout(function() {
      mqtt.connect();
      }, 10000);
      });
            }
         });
    }
    
  • cool, thanks for sharing.

    ERROR: [notify_error] Unable to retrieve board information. Connection Error?

    Is this still a issue?

  • Is this still a issue?
    After flashing this code, the module becomes unavailable via wifi for the espruino ide. There is a connection only through com port. What's the problem, help.

  • If you load the code without the MQTT library, everything works fine

  • Connecting...
    Set Slow Write = true
    Failed to open socket 192.168.0.121:23
    ERROR: Unable to open device (connectionInfo=undefined)
    ERROR: [notify_error] Connection Failed.
    Connection Failed.

  • after I give the command mqtt.connect(); pings go missing

  • I apologize for the uninteresting post. I found the problem. The problem was that the router was tilted Mac address of the PC. Therefore, the router blocked the connection.
    Now everything works just fine and I'm very happy :)

  • Glad you found it. Have fun with Espruino and think about $Donate 😉

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ERROR: [notify_error] Unable to retrieve board information. Connection Error?

Posted by Avatar for Alexandr @Alexandr

Actions