<div dir="ltr">Dear All,<div><br></div><div><div>We have a USB CDC device which we are connecting it to the Ubuntu system. Then, we are accessing the device using an application by opening the device with /dev/ttyACM0 node. The system may have multiple USB CDC devices already connected before connecting my device, sometimes. In such cases, my application fails to open the device, because, this time the assigned node is other than /dev/ttyAMC0, but in my application the device node is /dev/ttyAMC0 only. Due to these reasons, I want to assign my own device node in the /dev directory like /dev/mydev. This will enable my application to identify my device very easily.</div>
</div><div><br></div><div>The requirement is same as described in the link - <a href="http://marc.info/?l=linux-usb&m=130216901901572&w=2" target="_blank">http://marc.info/?l=linux-usb&m=130216901901572&w=2</a></div>
<div>
The answer is available at <a href="http://marc.info/?l=linux-usb&m=130217684009490&w=2" target="_blank">http://marc.info/?l=linux-usb&m=130217684009490&w=2</a></div><div><br></div><div>I have tried in different ways as I have also looked at the following sources. But, still, there is NO luck. When I insert another USB CDC device, it got /dev/ttyACM0 instead of getting ttyACM1. </div>
<div><a href="http://www.reactivated.net/writing_udev_rules.html" target="_blank">http://www.reactivated.net/writing_udev_rules.html</a></div><div><a href="https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html" target="_blank">https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html</a><br>
</div><div><a href="http://unix.stackexchange.com/questions/77476/point-usb-phone-to-specific-dev-ttyacm-using-udev" target="_blank">http://unix.stackexchange.com/questions/77476/point-usb-phone-to-specific-dev-ttyacm-using-udev</a><br>
</div>
<div><a href="https://www.pjrc.com/teensy/49-teensy.rules" target="_blank">https://www.pjrc.com/teensy/49-teensy.rules</a><br></div><div><br></div><div style>The kernel version and distribution details are as follows.</div>
<div style>Kernel Version --- 3.5.0-17-generic<br></div><div style>Distribution details are as follows.</div><div style>RELEASE=14<br></div><div>CODENAME=nadia</div><div>EDITION="MATE 64-bit"</div><div>DESCRIPTION="Linux Mint 14 Nadia"</div>
<div><br></div><div style>I have created a file, named 11-ttyACM.rules, under /etc/udev/rules.d directory. The contents of the file as follows.</div><div style>KERNEL=="ttyAMC0", SUBSYSTEM=="tty", ATTRS{serial}=="__0X00124B000148CC78", SYMLINK+="mydev"<br>
</div><div><br></div><div style>I got the above information from the following command</div><div style>udevadm info -q all -n /dev/ttyACM0 --attribute-walk<br></div><div style><br></div><div style>This is what I did. But, no luck. If I insert a different serial numbered device, then it is assigning ttyACM0 to that device. But, after this udev rule, it should not assign, I think.</div>
<div style><br></div><div style>Please someone, who already used/knows udev rules, suggest me.</div><div style><br></div><div style>Thanks.</div><div style><br></div><div style>Regards,</div><div style>Srinivas.</div></div>