COM port detection in Linux
问题 Please let me know if there is any API, system call, function (in Linux) which I can use my C program to detect a COM port dynamically, i.e., whenever a USB modem dongle is inserted in the port I will be able to detect that COM port using the API, or system call, or function in my C program. 回答1: Depending on your modem, USB serial port device may show up as /dev/ttyUSBn or /dev/ttyACMn , where n is some number starting from 0 . You can configure udev rule to automatically react on device