MacOS: programmatically search for serial ports?

Is there a library call on MacOS to display the available serial ports and the settings for each of them? Hopefully something that can shift in iOS at some time with minimal difficulty.

I would prefer not system("ls /dev/tty.*") and system("stty ...") , if possible.

+4
source share
1 answer

You use IOKit calls to look for serial ports.

See: Documentation and Code Sample

+5
source

Source: https://habr.com/ru/post/1387978/


All Articles