USB port conflict
I am using FC15. I have 2 usb devices both detected as CDC-ACM. The port to which devices are connected always keep changing.
Initially port to which device one connected is showing ttyACM0 and the other showing ttyACM1. When I removed these devices and reinsert them now I insert device two first so the ttyACM0 is got assigned to this device and device one got ttyACM1.
I want to keep port number same every time. Please suggest me what I need to do, so that every time my device one will get port ttyACM0 and device two ttyACM1 irrespective of anything.
You should be able to use udev rules to do this. The udevadm command can be used to interrogate the device and hopefully turn up some useful info (like serial numbers or other unique identifiers) which you can in turn use to craft your udev rules.
First find the serial character devices in the /sys directory, e.g.:
Say it turns up this file:
find /sys/|grep ttyACM
Now run udevadm like this to get info on it:
You should get back a bunch of info. Now write your udev rule. Where it goes, and exactly which attributes you can use depends on your distro and version of udev. See this document for starters on writing udev rules, it has been around a while, though is likely outdated now:
udevadm info --query=all --path=/sys/class/tty/ttyACM0
You can hopefully google for a tutorial on writing udev rules specifically for your distro.
Thank you very much. This helped me to solve my problem.
Is it possible to add serial device in same way to udev rules.
Do you mean the serial ports on the motherboard, or on a PCI card? I don't see why not, but I guess it depends on whether there is unique identifying attributes returned by udevadm.
Originally Posted by vishalp
If you got it to work using your ACM devices, can you not apply the same logic to the serial devices?