Open per1234 opened 2 years ago
@per1234 I just noticed this issue with the 2.x IDE I have installed. Using the Serial Plotter always leaves the serial port busy, no matter how I close the Plotter. If I then start/stop the Serial Monitor in the IDE, the port is released.
Describe the problem
If one process has a serial port open, another can not access it. Arduino IDE is designed to automatically manage access to ports by the various operations and components that use them:
The user may also use the port from an external application during sketch development in Arduino IDE. They will be responsible for managing the access of the port by the IDE and the external application. This means that the IDE must always relinquish port access when the user closes a component using the port
🐛 The port is left open after closing the Serial Plotter window.
To reproduce
🐛 Opening the port fails.
Expected behavior
Port is closed when Serial Plotter window is closed.
Arduino IDE version
2.0.0-rc9.4
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Additional context
From Windows Task Manager and GNOME System Monitor, I can see that the serial-monitor process is not being closed when the Serial Plotter window is closed.
I bisected the introduction of the issue to df8658e
The problem does not occur if the procedure described above is performed using Serial Monitor instead of Serial Plotter (in fact cycling Serial Monitor open and then closed again closes the port after it was left open by Serial Plotter).
The issue does not occur when using Arduino IDE 1.8.19 Serial Monitor
Some options for external applications that can be used for the final step in the demo:
screen
Opening the port in Arduino IDE 1.x Serial Monitor
Additional reports
Issue checklist