weixin_39797393 2020-11-29 18:17
浏览 0

CircuitPython writes to serial console over USB stop working after lots of output

I noticed one occasion where leaving an Adafruit CLUE running 5.0.0 beta 5 with some very verbose output to stdout for over an hour caused the terminal output to stop but the application continues merrily. I've just reproduced this with the same application/library code on 5.0.0 but it took approximately 130 minutes to do it.

  • 5.0.0 beta 5 with PuTTY 0.70 (this version misses various security fixes, not recommended for general use) on Windows 8.1 desktop
  • 5.0.0 with PuTTY 0.73 on Windows 10 laptop (left YT video running in browser to stop it from hibernating/screen saving)

The application is reading analogue values from P0-P2 and graphing them. It does not have the serial console active on the display. In both cases the application continued to run. PuTTY does not indicate the serial connection has closed. Control-C still works and takes the CLUE to the serial output on the LCD but with no output over USB. It says KeyboardInterrupt: as it normally does but does not respond to further typing, e.g. can't interact with REPL. Control-C and Control-D do nothing. In both cases the CIRCUITPY drive remains accessible. In the first case the writes stopped after the first of two arguments to print which made me more suspicious of CP than the terminal program.

I could continue interacting with the CLUE on both occasions. I could restart the code by coping a file onto CIRCUITPY. I could stop it with Control-C but still with no output to serial console, just the LCD when I hit Control-C. I've tried a Reset Terminal in PuTTY - nothing changed. I can disconnect COM5 then reconnect and everything's then back to normal. The special treatment here for Control-C makes it feel less likely to be a terminal program issue too.

Briefly discussed this with in Discord.

该提问来源于开源项目:adafruit/circuitpython

  • 写回答

11条回答 默认 最新

  • weixin_39797393 2020-11-29 18:17
    关注

    Code is here (messy and unfinished), both files needed, strip the .txt off. once it starts graphing click left button until Pad: graph appears to get the same output I left it running with. code.py.txt plot_source.py.txt

    I was using libraries from a bundle that looks like 22-Feb-2020 but seems unlikely these would have much impact on this type of bug?

    评论

报告相同问题?