c - Detect certain connected USB device -
I am working with a USB device in Linux and wrote a library to control this device. Without access to too many details, the device uses a standard URL protocol, so what I have to do is open a serial connection with open , baud rate Start, baud rate, stop bit, parity, etc, and bit-banging registers. The library works fine, however, it is difficult to believe that this device is / dev / ttyUSB0. That is, this is what I pass through open . If open fails, then I exit. What I want to do is find that this device is present, even if it is / dev / ttyUSB0 , / dev / ttyUSB1 , Etc. And even this can also be detected that these devices are connected to these devices. I can write code to choose some registers on device which gives serial number, product ID and so I can figure out what is actually on the other side of the USB that is actually Actually my device is ... but how do I list the connected USB devices again, in the original C Or a more elegant way to do this, such as the...