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

list_devices: adds support for several com ports #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wlgrd
Copy link
Collaborator

@wlgrd wlgrd commented Jul 25, 2024

After the firmware change in the official PPK2 application 4.2.0, the device now enumerates two serial ports: one for data and commands, the other for a debug shell which is not used in this library. This forces connection with the port on endpoint 1.

After the firmware change in the official PPK2 application 4.2.0, the
device now enumerates two serial ports: one for data and commands, the
other for a debug shell which is not used in this library. This forces
connection with the port on endpoint 1.
@wlgrd wlgrd force-pushed the support_multiple_endpoints branch from 5525bf1 to 2891553 Compare July 25, 2024 09:50
@wlgrd wlgrd changed the title list_devices: adds support for seveal com ports list_devices: adds support for several com ports Jul 25, 2024
@wlgrd wlgrd requested a review from NejcKle July 25, 2024 12:24
@@ -219,13 +219,13 @@ def list_devices():
devices = [
(port.device, port.serial_number[:8])
for port in ports
if port.description.startswith("nRF Connect USB CDC ACM")
if port.description.startswith("nRF Connect USB CDC ACM") and port.location.endswith("1")
Copy link

Choose a reason for hiding this comment

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

seems that location is same for both ports in macOS. But seems that first occurrence works there.

Copy link
Collaborator Author

@wlgrd wlgrd Aug 30, 2024

Choose a reason for hiding this comment

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

I unfortunately don't have a mac to test with, but "first occurrence"; can you elaborate? The location should be derived from the USB hub tree, and both having the same location doesn't make sense to me as there has to be two logical endpoints on the device.

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.

2 participants