Characters lost on connection to board since M33

Posted on
  • Two problems came up after updating to M33.

    1. reading process.env after connect often stops during reading data
      I checked incoming data in getProcessInfo, and recognized that data in about 50% is not received to the end. Changing timeout did not change anything. After switching back to prevReader it looks like missed data comes in to prevReader.
      Problem is easy to recognize. If you see process.env in terminal window, this problem happend.
    2. by sending data to espruino board, sometimes characters are lost.
      I checked this by copy/paste line by line to terminal window. Sometimes characters are lost, this happens in about 10% of lines.
  • Are you using USB or bluetooth?

    I had all sortsa issues with characters vanishing over bluetooth, and it turned out to be a bad solder joint between espruino and RX pin on HC-05.

  • Are you using the latest IDE, or your own branch? And on an Espruino board? I found that v33 tends to lose characters when it's not sending characters all at once. If it sends them via a single call then it is fine.

  • I am using last version from github.
    Connection is via USB and worked fine until updating to M33.
    I uploaded a video youtube

    .
    By copy/past (to avoid echo(0)) sometimes it stops even with small portions of code.

  • If board is not recognized during connect, sending source code to Espruino Board is much slower, but it works without problems.

  • Tested some more and got no problems if Espruino.Serial.slowWrite is true.
    It becomes true, if recognition of process.Env fails.

  • Ok, I'll try and look at it - and that's on Windows? It seems like MacOS may have similar problems.

    On Linux it's the opposite - it works but then 'slow' writing seems to lose data occasionally.

    So fed up really - it's like trying to hit a moving target. You get it working and then Chrome changes and it breaks. I should have just written a native app :(

  • Would it be a help to switch it on/off depending on OS ?
    Or to have a optionspage to hardset this ?

  • Yes, I'll probably end up doing it by OS. I'll play around, it may be I can tweak the throttling code so that it always throttles - but to a greater or lesser extent depending on the board.

  • Can you try with the development version now please? I think that should fix it - just tried on MacOS and Windows.

  • Just tested actual version from github.
    Same problem as before.

  • Argh. And what's your computer/OS?

    So much for write once/run everywhere. That dev version runs for me just fine on MacOS, Windows 7 and Linux.

    I guess I'll just add an option for it, and then people who are having problems can enable the throttling themselves.

  • My OS is windows 8 64 bit

  • I seem to be in a bigger issue since the last firmware upgrade. I connected the board initially on my Mac, got the new firmware message and then wrote the new firmware. Looked good, but then the connects failed with the strange 'yyyyyyy' writing to the console.

    So I took the Google Pixel out, hoping it would connect correctly - but it does not. I then thought I could do a firmware upgrade from the Pixel which also seems to fail. Any idea?

  • It seems I messed up version 1v56 (literally just a few minutes ago) - I've now pulled it back though.

    To recover from flashing the broken version, follow "I tried to reflash my Espruino Board, and now it won't work" under http://www.espruino.com/Troubleshooting

  • Ok, it's fixed now! Just follow the instructions above.

  • I still have problems with the connection between my windows 8 and Espruino.
    It is still the same problem, as in the video (see answer #4 in this conversation).
    Upgrading to actual WebIDE from Github and actual image did not help.
    Another strange behaviour entered the world:

    • created an object for TFT display with ILI9341, which works fine, as long as it is sent via slowmode
    • added a line to convert into a module. Someting like
      exports.connect = function(){ return new ILI9341(); };
    • by calling this module with
      d = require("ILI9341").connect();
      nothing happens anymore. The board does not respond anymore, I have to reconnect to get it back to work, and sometimes even have to reset.
      If I copy this commend to the terminal window it works fine.
      Before I forget, there is a require of "fs" inside the object, does this confuse anything if inside a required module ?
  • After changing setInterval in writeSerial (espruino_serial.js) from 60 to 100 it works now.

  • Ahh. Thanks. That's a strange one. It's sad that it takes so long...

    Having the require inside a module isn't a problem at all...

    By the way, the crash is probably because the final echo(1) didn't get executed. If you type:

    [Ctrl-C] echo(1) [enter]

    It would probably spring back to life.

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

Characters lost on connection to board since M33

Posted by Avatar for JumJum @JumJum

Actions