Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disconnected indicators in Serial Monitor/Plotter of subsequent windows #753

Closed
Assignees
Labels
@per1234

Description

Describe the bug

The Serial Monitor and Serial Plotter communicate to the user when the currently selected port is not connected (e.g., the user unplugged their Arduino board).

🐛 The Serial Monitor and Serial Plotter of all except the first Arduino IDE window of the session with a given port selected give this indication even when the port is indeed connected to the computer.

To Reproduce

Preparation

Upload a sketch to your Arduino board that sends plottable serial output:

void setup() {
 Serial.begin(9600);
}
void loop() {
 Serial.println(random(100));
 delay(500);
}

The bug will occur regardless of which sketch is on the board. This sketch is only intended to make the behavior easier to observe.

Observe baseline working state

This procedure is not required to reproduce the bug. It is only intended to prove that the issue does not occur in the first window of the session.

  1. Open the "Serial Monitor" view (Tools > Serial Monitor).
    🙂 Notice that no disconnected indicators are shown, as expected.
    image
  2. Open the "Serial Plotter" window (Tools > Serial Plotter).
    🙂 Notice that no disconnected indicators are shown, as expected.
    image
  3. Close the "Serial Monitor" view (X icon).
    This is not mandatory to reproduce the bug. It is done so that Serial Monitor will not be open in the first window of the next session, which might give the impression that is a required condition to reproduce the bug.
  4. Select File > Quit from the Arduino IDE menus.
    This is not mandatory to reproduce the bug. It is done so that it is clear that none of the operations performed during this procedure are required conditions to reproduce the bug.

Observe bug

  1. Start the Arduino IDE.
  2. If not already selected, select your board and port from the board/port selector dropdown.
  3. Select File > New from the Arduino IDE menus.
    This loads the second window of the current IDE session.
  4. Open the "Serial Monitor" view (Tools > Serial Monitor).
  5. Select "9600 baud" from the "Serial Monitor" view's baud rate menu.
    🙂 Notice that random numbers are periodically printed to the Serial Monitor view's output field, as expected.
    🐛 Notice that there is an unexpected banner in Serial Monitor:

    Not connected. Select a board and a port to connect automatically.
    image

  6. Open the "Serial Plotter" window (Tools > Serial Plotter).
    🙂 Notice that random numbers are periodically plotted in the Serial Plotter, as expected.
    🐛 Notice that the Serial Plotter window title has the "(disconnected) suffix.
    🐛 Notice that a "Board disconnected" notification is shown in the Serial Plotter window.
    🐛 Notice that some Serial Plotter UI elements are disabled.
    image

Expected behavior

Serial Monitor and Serial Plotter of subsequent IDE windows to connect to the selected port.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc3-snapshot.35e5da5
    Date: 2022年01月13日T17:15:54.562Z
    CLI Version: 0.20.2 [13783819]

Additional context


I believe this issue, #752, and #726 to all be different symptoms of the same bug. I decided to open a separate issue for each distinct symptom because users affected by one symptom will not associate it with the report for another symptom, making the bug more difficult to support and track.


I bisected the related issue #726 to 767b09d (it does not occur at 8839793).


Originally reported by @hpssjellis at:
https://github.com/hpssjellis/my-examples-for-the-arduino-portentaH7/tree/master/ide2.0#:~:text=why%20does%20it%20say%20it%20is%20not%20connected
and by @DroneBotWorkshop at:
https://forum.arduino.cc/t/rc3-serial-plotter-monitor-show-disconnected-when-they-are-not/947524

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /