-
Notifications
You must be signed in to change notification settings - Fork 236
usb-detection module fails to load #1453
Comments
@milanbx What value to you have for the |
Whell, I have never explicitly used this setting, neither turned it on, nor off, always left it in its default. I am not even sure, how it affects the serial output. Anyway, I have had it turned on until now. And yes, I see the issue, as you have described it above. Why are you asking? |
UPDATE: I have turned the USB deteciotn off, upgraded to Code 1.64.2 and Arduino extension 0.14.1 and the Serial Monitor still not working. And it really depends on what characters you send to the serial. If it was simple ASCII like "-------", it worked. But when I listed for example FS content (file names), nothing good came out, just single characters like '$' or 'r' etc. |
Dear Microsoft, are you serious? With almost every update of Visual Studio Code, the serial port stops working due to the incompatible Arduino extension and the update to the extension is not yet available. I had to disable VS Code updates on my machine because of this. Within one company (even that big as Microsoft), it should be possible to establish an arrangement between the teams ("VS Code" and "Arduino") to deliver the working product. Indeed, Tested with Linux Mint 19.3 (based on Ubuntu 18.04) Kernel: 5.4.0-99 (64bit) and ESP8266 / CH341 USB-to-Serial converter. |
@milanbx, what serial transmission rate is set in your sketch and in the terminal (VS Code)? Strange single characters could be indication of the different speed setting. |
Good question, just to be sure, but the speed for serial is set to 115200: |
Just to give complete info, here is the simple sketch: #include <LittleFS.h>
void setup() {
delay(500);
Serial.begin(115200);
Serial.println("\n------------------");
if (LittleFS.begin()) {
Serial.println("FS OK");
} else {
Serial.println("FS failed");
return;
}
Dir dir = LittleFS.openDir("");
while (dir.next()) Serial.println(dir.fileName());
FSInfo fsi;
LittleFS.info(fsi);
Serial.printf("totalBytes %lu\n", fsi.totalBytes);
Serial.printf("usedBytes %lu\n", fsi.usedBytes);
Serial.printf("blockSize %lu\n", fsi.blockSize);
Serial.printf("pageSize %lu\n", fsi.pageSize);
}
void loop() { } |
The line at 14:14:43.263 should be boot-loader output at 74880 baud. It is strange, but normal. ;-) I have an impression, the serial monitor in VS Code starts to work properly about 2 seconds after "opening". Try to print something later (i.e. increase the delay of 500 ms to 3000) or print in the main loop like every second (not continuously). Also waiting between Serial.begin() and first Serial.println() could be useful. Or first activate the serial port in VS Code and then reset the ESP. |
Well, I may try this, but every single sketch I have made until today (dozens) runs and prints to serial without any delays, even without the initial 500ms like here! |
OK, I have increased the initial delay to 1s and right after the sketch bin is uploaded and "Hard resetting via RTS pin..." done, the sketch starts and works fine (prints all lines as expected). However, the output is somehow snatchy, the lines are not printed at once. This is not appening in Arduino serial monitor, wher the output is fluent. |
@milanbx which version of the Arduino extension are you using? We made some major changes to the way serial works in version 0.4.11 that should help with handling reset, but please let me know if you're still seeing issues. The "snatchy" behavior you see is likely related to #1412 which was required to avoid blocking the output window when there was a lot of data on the serial port. Does data appear roughly 3 times a second? That's the flushing interval for the output window. |
I am using 0.4.11 Preview and it seems, that no more issues appear. You may consider this case closed for now. Thanks a lot for help. |
Thanks for following up! Closing this issue. |
Hi, my VS Code 1.64.1 with Arduino extension v0.4.10 experienced the same behaviour: When clicked to open the serial monitor and reseted teh device (ESP8266 in my case), no output i shown. I have increased the Developer Log Level to 'trace' and ther is en exception related to this extension in
Log (Window)
Output - see attached log file renderer1.log.Originally posted by @milanbx in #1338 (comment)
The text was updated successfully, but these errors were encountered: