|
USB->Serial Device
Hi there all...
I've got the following problem in linux. I have six USB->Serial devices that have six distint serial numbers.
I must make some code in order to interact with all of them. The problem is that everytime i plug in the usb, the ttyUSB are given in a First Plugged First ttyUSB Number Given kind of policy (i invented this).
I want to associate serial number 111111111 with ttyUSB0, 22222222 with ttyUSB1 etc.
In my view i can make this two ways:
1 - Open ttyUSB* and try to get the serial number of this device through the filedescriptor or,
2 - use libusb and try to find the ttyUSB devices that are associated with each serial number of the devices i'm using.
I can't seem to find the linkage between filedescriptor and the associated ttyUSB* nor even through libusb to get the ttyUSB*.
I'm new to Linux.
Any help would be appreciated.
Hugo
|