C++: List USB Serial Port by VID/PID on macOS

Viewed 15

I am having the following issue: I have connected an Arduino to my macOS and wrote an application that communicates with it via the serial port. That works fine. The user can just select it from a list and start working with it. Yet, the list shows all devices mounted under /dev/tty.* able to do serial communication. Now I want to limit this list to Arduino devices only. Any idea how to do that? I was thinking about using the vid/pid (that works on Windows well) but whatever I tried I cannot make the link between the vid/pid and the mounting point in /dev. I tried to modify the sample code from Apple that lists all available devices but there seems to be no way to read the vid/pid. I have spent now the whole day on this. So any help is highly appreciated.

Raphael

0 Answers
Related