You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it is possible to get which port the device is connected to with list_devices() but I have two PPK2's in a system and need to know which is which without relying on systems enumeration (a.k.a /dev/ttyACM0).
I checked the source code of the library but couldn't find it.
Ah, of course. Will have a look at that later when I have access to a Windows computer. If you have any input and you're able to test, please feel free to pitch in and I will update the PR (I don't know if serialtools has the same support for fetching the serial in Windows)
Activity
berkersal commentedon Feb 13, 2024
By looking at
list_devices()I implementedIt may be a good idea to but serial number in PPK2_API object so people can easily get the serial number
wlgrd commentedon Apr 18, 2024
@berkersal Will this suffice #43 ?
berkersal commentedon Apr 18, 2024
Yes it helps for my case but it will break the examples for Windows
wlgrd commentedon Apr 18, 2024
Ah, of course. Will have a look at that later when I have access to a Windows computer. If you have any input and you're able to test, please feel free to pitch in and I will update the PR (I don't know if serialtools has the same support for fetching the serial in Windows)
wlgrd commentedon Apr 18, 2024
Added the same changes to the windows part of
list_devices()as I would assume that worksberkersal commentedon Apr 18, 2024
I don't have access to a Windows computer that I can use with PPK. But the documentation of pyserial says Windows also supports serial number.
https://pyserial.readthedocs.io/en/latest/tools.html?highlight=serial.tools.list_ports.comports()#serial.tools.list_ports.comports
wlgrd commentedon Apr 19, 2024
Got around to test it now, it works for both systems