Serial Monitor loses connection after PC sleeps #1895
Labels
topic: code
Related to content of the project itself
topic: serial monitor
Related to the Serial Monitor
type: imperfection
Perceived defect in any part of project
Describe the problem
Serial Monitor is the primary tool for Arduino IDE users to get runtime feedback from a sketch program. Since it is not intrusive and does not interfere with the usability of the other Arduino IDE UI components, the average user likely has the Serial Monitor open most of the time.
Putting the computer through a sleep/wake cycle while Serial Monitor is open causes loss of connection to the port.
🐛 When in this state, Serial Monitor does not show data sent by the board and does not transmit messages the user sends from the message field. It does not give any indication of the lost connection to the user.
To reproduce
🙂
hello
is printed in the Serial Monitor output field at 1 Hz.foo
in the Serial Monitor message field.🙂
foo
is echoed in the Serial Monitor output field.🐛
hello
is no longer printed in the Serial Monitor output field at 1 Hz, even though the TX LED on the Arduino board shows it is transmitting serial data.🐛 There is no indication of a lost connection in the Serial Monitor UI.
foo
in the Serial Monitor message field.🐛 The RX LED does not blink on the Arduino board to indicate serial data was received.
🐛
foo
is not echoed in the Serial Monitor output field.Expected behavior
Putting computer through a sleep/wake cycle does not cause the loss of Serial Monitor's connection to the port.
-OR-
The loss of the connection is clearly communicated to the user (related issue: #1508).
Arduino IDE version
Original report
d68bc4a (with serial-monitor 0.13.0)
Last verified with
8f8b46f (with serial-monitor 0.13.0)
Operating system
Operating system version
Additional context
I was not able to reproduce the issue on my Linux (Ubuntu 22.04) machine.
The fault does not occur under the same conditions when using
arduino-cli monitor
, the Arduino CLI gRPC interface with grpcurl, or Arduino IDE 1.8.19When the
arduino.cli.daemon.debug
setting is enabled, I see this in the logs from the time the PC is put to sleep:But there is no equivalent log output to indicate an attempt to start the monitor process again after the PC wakes.
The fault occurs both with boards that have a dedicated USB chip (e.g., Uno) and boards with native USB (e.g., Leonardo).
Originally reported at: https://forum.arduino.cc/t/ide-disconnect-form-the-board-after-pc-suspension/1092323
Additional reports
Workaround
Issue checklist
The text was updated successfully, but these errors were encountered: