-
Notifications
You must be signed in to change notification settings - Fork 236
Latest version breaks serial monitor - interferes with manual reset of ESP32. #1458
Comments
Thanks for the report @clarkbremer! We made some fairly significant changes to the serial communication infrastructure in 0.4.11 to address false positives with antivirus scanners, and I'm guessing this is fallout from that work. To clarify, do you expect DTR to always be high, or are there cases where you'd want DTR to be low from the serial monitor? Also which Espressif hardware are you using? I have a few of these development boards that I can test with. |
I'm using a pretty standard ESP32: https://www.amazon.com/gp/product/B0718T232Z/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 The DTR line is wired to the "BOOT" input (GPIO0). So if you reset the board, and this is low, it will enter "programming" mode, and give a message like this: The only time DTR should go low is when you are trying to upload code to the device. Also, Version 4.10 was also a regression from 4.9. It does not make DTR go low at all. So you have to do the equivalent with the button on the board. I'm currently using 4.9, and it works properly. For proper operation of software upload:
|
Thanks for all that info! That should be enough for me to investigate this. |
I can confirm DTR (GPIO 0) is kept low when Serial console is open. The issue is also for ESP8266 dev boards. |
Additional info: Serial console should not control signals for reset and boot. Reboot is done by unloading. Opening the serial console shouldn't reset the device. Or, this could be at least configurable. |
I am also not able to use serial monitor. Rolled back to 4.1.0 and it also does not work. I checked my issue from September #1338 that was closed. I have not been able to use VSCode for Arduino development for a looooong time because of the constant instability. Being able to monitor serial is a "must have" to develop on Arduino with VSCode. Can this be added to the highest priority stability testing on all platforms before each release of the plugin? |
@clarkbremer @vlastahajek @hoekma Can you uninstall the Arduino extension and try installing the appropriate VSIX from this CI build? It includes this change which should keep DTR, RTS, and CTS high while the serial monitor is active. It worked with my ESP32 Dev Module, but let me know if you see any issues. |
Tested with ESP32 Dev Module and also an Arduino Pro Mini. Both worked fine. Noticed that on the pro mini, opening the serial port resets the board, but the Arduino IDE behaves the same way, so I guess that's OK. |
Thanks for verifying! I'll get this merged and in the next release. |
I can confirm the fix works ok also for ESP8266 based boards. |
This issue has been fixed in the latest release of this extension, which is available in the VS Code extension marketplace. |
I'm using a ESP32-S3-WROOM device and find both the nRTS and nDTR lines are pulled low when I invoke the Serial Monitor after a code download. I can download code fine when selecting the board "ESP32S3 Dev Module", but now have to select the board "ESP32 Dev Module" if I want to use the Serial Monitor. This has to be a software bug somewhere. I can only find the ESP32-S3 support via the Arduino 1.8, but not the Arduino 2. In Arduino 1.8, in File/Preferences/Additional Board Manager, I put: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json, https://dl.espressif.com/dl/package_esp32_index.json .... the github package has the S3 support. In Arduino 2, I haven't located anything that supports the S3. |
With the latest version of the extension (0.4.11), the serial monitor interferes with a manual reset of my Arduino board (an ESP32). It behaves as if the boot button is being held low (GPIO0 in my case). So a manual reset causes it to enter boot mode instead of just running the code. Seems DTR is being left low when it should not be.
It works fine if I disconnect the USB cable. And it works fine if I roll back to 0.4.10.
FYI: Version 0.4.10 still requires user to manually push the boot button to upload new code. This worked correctly in version 0.4.9 - upload worked without having to push any buttons. That's the desired behavior, of course.
Version: 1.63.2 (user setup)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:40:02.816Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000
The text was updated successfully, but these errors were encountered: