Skip to content
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

Filter serial devices by default and allow user to disable chip id in serial port list #1276

Merged
merged 7 commits into from
Sep 13, 2024

Conversation

brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Aug 9, 2024

Description

Add idf.enableSerialPortChipIdRequest and idf.useSerialPortVendorProductFilter which are set true by default.

Now the serial ports listed with the ESP-IDF: Select port to use command will only show know USB serial ports by filtering them with productID and vendorID. This can be disabled with "idf.useSerialPortVendorProductFilter": false in settings.json

esptool.py chip_id is executed when running the previous command to get the chip name and show it in the list. This can be disabled with "idf.enableSerialPortChipIdRequest": false in settings.json.

Add idf.usbSerialPortFilters for user to define the list of USB PID VID filters.

Fixes #1274

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Click on "ESP-IDF: Select port to use ". Now only Espressif devices should be shown by default.
  2. Set "idf.useSerialPortVendorProductFilter": false and Click on "ESP-IDF: Select port to use ". Now all serial ports will be shown. If set true, the behavior is back as step 1.
  3. Set "idf.enableSerialPortChipIdRequest": false and Click on "ESP-IDF: Select port to use ". Now the esptool.py chip_id is not executed and the chip name is not shown in list. If set true, the behavior is same as step 1.
  • Expected behaviour:

  • Expected output:

How has this been tested?

Manual testing with steps above.

Test Configuration:

  • ESP-IDF Version: 5.2.2
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@brianignacio5 brianignacio5 added this to the 1.9.0 milestone Aug 9, 2024
@brianignacio5 brianignacio5 self-assigned this Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

Download the artifacts for this pull request:

Copy link

github-actions bot commented Sep 8, 2024

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Sep 8, 2024
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Sep 9, 2024
Copy link
Collaborator

@radurentea radurentea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@radurentea
Copy link
Collaborator

Hi @Fabricio-ESP,

Please take a look

@Fabricio-ESP
Copy link
Collaborator

Having some troubles to get the correct data from the connected USB devices.
From the parameters provided, "UseSerialPortVendorProductFilter" is disabled by default. (updated official VSCode installation with the test binaries, on a Windows 11 machine).

image

Enabling filter, it shows the WROVER module only, the devices using Silicon Labs USB converters are filtered out.

image
image

Selecting the option to detect the chip id does not change this behavior.

image

Also observed that when the option to read the chip ID is selected, the detection of the WROVER module is intermitent.

image
image

@brianignacio5
Copy link
Collaborator Author

I've added USB CDC-ACM in the default list. Could you try again @Fabricio-ESP ?

Regarding the intermittent issue, do you see any related error in the extension log/ doctor command output ? It might be also be a timeout or connection issue.

@brianignacio5 brianignacio5 force-pushed the bugfix/serial-port-list branch from 126c810 to e068583 Compare September 12, 2024 08:57
@Fabricio-ESP
Copy link
Collaborator

Confirmed USB devices are not properly selected and filtered.
Tested on Windows 11 and Ubuntu with ESP32, ESP32-C6 and ESP32-S3 devkits.

The parameters to filter the devices is disabled by default.

Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues observed on the last build.

@brianignacio5 brianignacio5 merged commit e31b39d into master Sep 13, 2024
7 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/serial-port-list branch September 13, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening the port list is always slow (VSC-1458)
3 participants