Save on Send does not load on v1.94 with esp8266

Posted on
  • Hi,
    I don't seem to be able to load with Save on Send of the web ide. save() works and load correctly, but with setBootCode looks like the load does not load anything. Sometimes it triggers "ERROR: Prompt not detected - upload failed. Trying to recover...".
    For me, Save-on-send didn't work either on the v1.93, I get "Not connected to the internet", with and without load-as-function option (see http://forum.espruino.com/conversations/­296431/). Until now, the only way to get this option working is with v1.93.162 I compiled (http://forum.espruino.com/conversations/­305014/#comment13761399).

    Here is my code :

    function start(){
    pin=NodeMCU.D2;
    var dht22 = require("DHT22").connect(pin);
    var dht22_read_test = function() {
      dht22.read(
        function(a){
          console.log("Temp is "+a.temp.toString()+ "C and RH is "+a.rh.toString()+"%");
           
         });
    };
    setInterval(dht22_read_test,3000);
    print("started");
    };
    
    E.on("init",start);
    print("init");
    

    Here is the result with v1.94 :

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v94 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xef chip 0x4016
    >Erasing Flash..................
    Writing....
    Compressed 25600 bytes to 113Loading 1130 bytes from flash...
    =undefined
    >
    =undefined
    >E.getSizeOf(global)
    =13
    >E.getSizeOf(global,1)
    =[
      {
        "name": "\xFF",
        "size": 16 },
      {
        "name": "E",
        "size": 2 }
     ]
    >
    
    

    Here is the result with 1.93.162:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v93.162 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xef chip 0x4016
    >Erasing Flash.....
    Writing....
    Loading 1124 bytes from flash...
    init
    started
    Temp is 26.1C and RH is 47.6%
    Temp is 26.2C and RH is 48.3%
    
  • "ERROR: Prompt not detected - upload failed. Trying to recover..." is an indicator for the case where something is already started before the upload has finished.

    This cannot be all code there is, because you are talking "Not connected to the internet"...

    In case of autoconnect - based on saved connection profile / credentials - you should catch the on-connect event and then start your application.

    Where the difference comes between the versions, I don't know. I also do not know where the print goes and how it is configured... It may be held back. See comments about console and console redirection...

  • Thanks allObjects,
    This "ERROR: Prompt not detected - upload failed. Trying to recover...", rarely happen, most of the time, the board restart and say it loads, but nothing is really loaded, like in the output I show.

    I do not use internet. This is all the code I use, I even did a setBootCode("") before save on send, to be sure. The problem of v1.93 with "not connected to internet" without any code using internet, is mentioned also in the other thread http://forum.espruino.com/conversations/­296431/.

    Even the print("init") in my code is not executed, how can I catch an event to start my app ?

    So you say possibly it's the print that is not working ? Where can the print go ? The same program works fine, prints correctly, when saved with save().

  • I try to picture in your most recent feedback.

    Recently I looked at that option in the IDE, but I felt it has not just to do with automatically add a save() command after upload... I anyway do not use it because it just wears down the flash on my devices with the high-frequency round-tripping development style I tend to practice.

    So sorry, have not much more helpful right now... if you can wiggle a pin and blink a led instead of print (or use the serial tx debug output of the 8266, that could may be of some help).

  • Ok, thanks allObjects. It was practical for me as I make a program that will start automatically when I power the esp. I'll continue using save() (or the v1.93.162 for dev), not a big deal.

  • Hi...i am a new user here. As per my knowledge In case of autoconnect - based on saved connection profile / credentials - you should catch the on-connect event and then start your application.Where the difference comes between the versions, I don't know. I also do not know where the print goes and how it is configured.

  • Is your problem solved?

  • Nope, save-on-send still does not work for me on v1.94. I keep using v1.93.162, I am waiting and hoping the v1.95 will fix it. I can still save/load with save() and load(), but I cannot send the code with modules to be executed from flash, except with my own WebIDE plugin .

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

Save on Send does not load on v1.94 with esp8266

Posted by Avatar for Polypod @Polypod

Actions