Skip to content

Port is persistently discovered after disconnect #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
davegarthsimpson opened this issue Aug 1, 2023 · 1 comment · Fixed by #830
Closed
3 tasks done

Port is persistently discovered after disconnect #808

davegarthsimpson opened this issue Aug 1, 2023 · 1 comment · Fixed by #830
Assignees
Labels
os: macos Specific to macOS operating system type: imperfection Perceived defect in any part of project

Comments

@davegarthsimpson
Copy link

davegarthsimpson commented Aug 1, 2023

Describe the problem

When using the agent, with the debug console, or web editors, often after a port is discovered, and visualised by the list command, it appears to persist indefinitely in the memory of the agent.

After the associated board is disconnected, it is continuously detected and continuously appears in response to the list command.

To reproduce

  1. Open the agent debug console
  2. Connect a board via USB
  3. Wait a few seconds
  4. Run the list command
  5. The port should appear in the response to the list command
  6. Wait a few seconds
  7. Disconnect the board
  8. Wait a few seconds
  9. Run the list command
  10. The port continues to appear in the response to the list command (bug)

Expected behavior

After the board is disconnected its port should no longer appear in the response to the list command.

Arduino Create Agent version

1.3.2-d170a5e

Operating system

macOS

Operating system version

Ventura 13.1

Browser

Chrome

Browser version

115.0.5790.114

Additional context

The problem is also visible with the web IDEs.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@davegarthsimpson davegarthsimpson added the type: imperfection Perceived defect in any part of project label Aug 1, 2023
@umbynos umbynos added the os: macos Specific to macOS operating system label Aug 23, 2023
@umbynos
Copy link
Contributor

umbynos commented Aug 23, 2023

We could take advantage of this bug to introduce the discovery protocol in the agent. (some works has already been done in #773

Advantages:

  • The bug is fixed, since this is working in the CLI and IDE2
  • We could remove some code duplication
  • The agent is already able to install and run tools from the package_index
  • In the future other discoveries can be added (like DFU one)

Disadvantages:
none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macos Specific to macOS operating system type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants