Restart to use Web IDE after Flash of ESP8266-01

Posted on
  • I have to restart my computer after I have flashed ESP8266-01, to use Espruino Web IDE,because it won't connect.

    Connected
    >
    Disconnected
    
    

    I use Mint 18.1 and chromium.
    I have tried to pull the USB cable, and log out, login.
    I can connect via GtkTerm without restart.

    Before christmas it worked allright.
    Anybody have the same behavior?

  • Yes. I get a similar thing with the esp32 and windows 10.

    I can connect with putty, but not the ide after a flash.

    So what I do is

    • flash
    • hit reset button on the board
    • connect with putty, then quit
    • connect via the ide

    Because this is a pain, I have the board set up to connect to wifi and use the ip address in the ide and connect via tcpip.

  • Even I only do a erase_flash without setting ESP in boot mode, it's the same.
    From the console in settings.

    conection ok

    Initialising Debugger
    Initialising Tour
    Initialising SettingsProfile
    Initialising HelpLinks
    Loaded code from storage.
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    Received a prompt after sending newline... good!
    >>> Sending...
    ---> "\u0010console.log(\"<\",\"<<\",JSON.str­ingify(process.env),\">>\",\">\")\n"
    >>> Sent
    Got "< << {\"VERSION\":\"1v91.66\",\"BUILD_DATE\":­\"Mar  5 2017\",\"BUILD_TIME\":\"14:37:09\",\"GIT­_COMMIT\":\"567fee8447461adf4a57d7630192­9b3f63edb601\",\"BOARD\":\"ESP8266_BOARD­\",\"CHIP\":\"ESP8266\",\"CHIP_FAMILY\":­\"ESP8266\",\"FLASH\":0,\"RAM\":81920,\"­SERIAL\":\"18fe349d-47ca\",\"CONSOLE\":\­"Serial1\",\"EXPORTS\":{\"jsvLock\":1075­850320,\"jsvLockAgainSafe\":1075850372,\­"jsvUnLock\":1075850744,\"jsvSkipName\":­1075859352,\"jsvMathsOp\":1075864552,\"j­svMathsOpSkipNames\":1075866244,\"jsvNew­FromFloat\":1075857060,\"jsvNewFromInteg­er\":1075856960,\"jsvNewFromString\":107­5856620,\"jsvNewFromBool\":1075857028,\"­jsvGetFloat\":1075862368,\"jsvGetInteger­\":1075858848,\"jsvGetBool\":1075862728,­\"jspeiFindInScopes\":1075877572,\"jspRe­placeWith\":1075877292,\"jspeFunctionCal­l\":1075887616,\"jspGetNamedVariable\":1­075879416,\"jspGetNamedField\":107587986­0,\"jspGetVarNamedField\":1075879992,\"j­svNewWithFlags\":1075856360}} >> >\r\n>"
    Loading http://www.espruino.com/json/ESP8266_BOA­RD.json
    Device found (connectionId=1)
    [success] Connected to port /dev/ttyUSB0
    >>> Connected to port /dev/ttyUSB0
    Board JSON loaded
    Set Slow Write = true
    FIRMWARE: Current 1v91.66, Available 1v91
    

    conection lost

    Initialising Debugger
    Initialising Tour
    Initialising SettingsProfile
    Initialising HelpLinks
    Loaded code from storage.
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    ERROR: RECEIVE ERROR: {"connectionId":1,"error":"device_lost"}­
    Disconnect callback...
    WARNING: [notify_warn] Disconnected
    >>> Disconnected
    ERROR: executeExpression called when not connected!
    
  • Not sure why it wouldn't be going - but I'm not sure much has changed in the IDE in the last few months. You could try manually loading an older IDE from GitHub and see if that fixes it, then you could git bisect to narrow down the problem (if there was one).

    I'm afraid it could just be something in a new version of Chrome though.

  • I'm getting this after flashing an ESP32:

    >>> Disconnected
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    ERROR: RECEIVE ERROR: {"connectionId":2,"error":"overrun"}
    Disconnect callback...
    WARNING: [notify_warn] Disconnected
    >>> Disconnected
    ERROR: executeExpression called when not connected!
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    Found a prompt... great!
    >>> Sending...
    ---> "\u0010console.log(\"<\",\"<<\",JSON.str­ingify(process.env),\">>\",\">\")\n"
    >>> Sent
    ERROR: RECEIVE ERROR: {"connectionId":3,"error":"overrun"}
    Disconnect callback...
    WARNING: [notify_warn] Disconnected
    >>> Disconnected
    WARNING: No result found - just got ""
    Device found (connectionId=3)
    [success] Connected to port COM3
    >>> Connected to port COM3
    

    If from the ide If I attempt disconnect/connect a few times, and then hit reset on the board, it finally connects.

  • If this only seems to be happening with ESP32/ESP8266 flashing tools, it might be worth filing a bug with them? Are you sure they're not still running in the background in some form?

    I imagine Windows 10 vs Linux problems are different, but on linux try running stty -a -F /dev/ttyACM0 before and after - it's possible that the communication port settings have got messed up somehow

  • Are you sure they're not still running in the background in some form?

    No - the serial port gets locked - you can't flash with a current ide connection. And the esptool.py script is closed before attempting to reconnect in the ide.

    Can you please explain what this means:
    ERROR: RECEIVE ERROR: {"connectionId":2,"error":"overrun"}

  • It's from here: github.com/espruino/EspruinoTool­s/blob/gh-pages/core/serial_chrome.js#L1­06

    which is straight from chrome. developer.chrome.com/apps/serial­#event-onReceiveError

    Chrome says overrun is:

    A character-buffer overrun has occurred. The next character is lost.

    So I guess you could try simply ignoring that particular error? I guess maybe Chrome recently added the reporting of it? Maybe it's just because the ESP8266/etc sent a whole bunch of data before it connected and so some data ended up getting dropped from the buffer?

  • That seems to be different to @Frida's problems though - I've never seen 'overrun' before.

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

Restart to use Web IDE after Flash of ESP8266-01

Posted by Avatar for Frida @Frida

Actions