<div dir="ltr">Hi Bjorn,<div><br></div><div style>Yes. It was a TYPO. It should be ttyACM0, but not ttyAMC0. After changing to ttyACM0, it is working fine without any issues. Thanks.</div><div style><br></div><div style>As you said, yes, if we assign ttyACM*, then it works fine even if we insert our device later, after inserting other ttyACM devices, also. If we do not use * then it won't work if we insert our device after inserting other ttyACM devices.</div>
<div style><br></div><div style>My issue was resolved by changing the KERNEL=="ttyACM0" instead of KERNEL=="ttyAMC0". This is a simple TYPO and my overlooking while reading the rules.</div><div style><br>
</div><div style>Anyhow, I have changed the rule as shown below.</div><div style><br></div><div style><span style="font-family:arial,sans-serif;font-size:13px">KERNEL=="ttyACM*", SUBSYSTEM=="tty", ATTRS{serial}=="__</span><span style="font-family:arial,sans-serif;font-size:13px">0X00124B000148CC78", SYMLINK+="mydev"</span><br>
</div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Then, all issues were resolved. It works fine irrespective of the device insertion, too.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Thank you all.</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Regards,</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Srinivas.</span></div><div style><br></div><div style>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 4:29 PM, Bjørn Mork <span dir="ltr"><<a href="mailto:bjorn@mork.no" target="_blank">bjorn@mork.no</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Srinivas Ganji <<a href="mailto:srinivasganji.kernel@gmail.com">srinivasganji.kernel@gmail.com</a>> writes:<br>
<br>
> I have created a file, named 11-ttyACM.rules, under /etc/udev/rules.d<br>
> directory. The contents of the file as follows.<br>
> KERNEL=="ttyAMC0", SUBSYSTEM=="tty", ATTRS{serial}=="__0X00124B000148CC78",<br>
> SYMLINK+="mydev"<br>
<br>
</div>So this rule will create a symlink from /dev/mydev -> /dev/ttyAMC0 if<br>
all these conditions are met:<br>
<br>
a) KERNEL=="ttyAMC0"<br>
b) SUBSYSTEM=="tty"<br>
c) ATTRS{serial}=="__0X00124B000148CC78"<br>
<br>
I believe the a) condition is not exactly what you want. Firstly, the<br>
spelling makes it likely to never match...<br>
<br>
Secondly, even if you correct it to ACM, you really want this rule to<br>
match regardless of which ttyACMx device is assigned. That way you can<br>
ignore the device name and use the static /dev/mydev symlink.<br>
<br>
So you'd want to do something like this instead:<br>
<br>
KERNEL=="ttyACM*", SUBSYSTEM=="tty", ATTRS{serial}=="__0X00124B000148CC78", SYMLINK+="mydev"<br>
<div class=""><br>
> I got the above information from the following command<br>
> udevadm info -q all -n /dev/ttyACM0 --attribute-walk<br>
><br>
> This is what I did. But, no luck. If I insert a different serial numbered<br>
> device, then it is assigning ttyACM0 to that device.<br>
<br>
</div>Yes. There is nothing in the rule controlling which name the kernel<br>
assigns. You cannot change this in any case. It's already decided at<br>
the point where the udev rule runs.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
Bjørn<br>
</font></span></blockquote></div><br></div>