Uploading via the App.

Posted on
  • When I try to send some code with the App, it looks like it does a reset() first, but on my board is seems to loose the connection completely. Is the App looking at signalling from the serial port RTS/CTS or some other USB signalling?

  • Yes, it does reset, but it's a software reset that shouldn't affect the USB. Sadly there is no RTS/CTS...

    Is this with an Espruino board, or the discovery? I think you were using the discovery last time.

    It could be that the discovery is losing some characters - I know USB on it isn't as reliable for some reason, but sadly nobody has made any attempt to fix it, and I have to focus on the Espruino board. You could try turning on throttling in the IDE.

    It may be that you can actually recover it by doing Ctrl+C, echo(1), enter. Sometimes what happens is the board's buffer gets full, and it loses some characters which means that the last command (turning echo back on) doesn't get executed.

  • My final design will not have USB, so I was using the discovery with a console on a serial port via a FTDI cable. The com port does not reset, just the discovery, but the App seems to disconnect from the com port. I can send a reset from a terminal program and the connection remains. What is the App expecting back as response from the discovery? From a terminal I see 0x1b 0x5b 0x3f 0x37 0x6c 0x0d 0x0a and then the Espruino logo. I did add a datestamp under the logo, is it parsing the logo?

  • Did you try my Ctrl+C suggestion?

    0x1b/etc are just escape codes to set up VT100 terminals correctly

    The Web IDE sends some JavaScript code when it connects, and looks for a response. I imagine the problem might just be that there is absolutely no flow control on serial comms - XOn/XOff or otherwise - and if you send code that takes a lot of time to execute, that will cause subsequent code to get lost (once the buffer is full).

  • The Ctrl+C had no effect. I turned off 'reset() before send' and the code loads just fine, I have something useful now. It is strange I can type in reset() on the terminal side of the Web IDE and it does not disconnect, so I can work with this as a 2 step process for now. Thanks for the help and quick response.

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

Uploading via the App.

Posted by Avatar for tobor @tobor

Actions