From: Greg KH <gregkh@linuxfoundation.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev: attributes rules to identical devices
Date: Wed, 15 Jan 2014 14:26:54 +0000 [thread overview]
Message-ID: <20140115142654.GA3984@kroah.com> (raw)
In-Reply-To: <loom.20140115T151508-295@post.gmane.org>
On Wed, Jan 15, 2014 at 02:15:43PM +0000, Theo wrote:
> Hello everybody,
>
> I am working with Kubuntu 13.10.
> I need to assign permanent names to some modems that I am working with.
> This would be possible by creating a rule in /etc/udev/rules.d/ and defining
> a symlink, something like this:
>
> KERNEL="ttyUSB[0-9]*", ATTRS{serial}="0000:00:1d.0", SYMLINK="Modem0"
>
> The problem is that all these modems have the same serial, so I cannot
> distinguish them and cannot assign a different symlink to each one.
>
> If it can help, the output of lsusb with two modems connected is this:
>
> Bus 006 Device 002: ID 0403:6001 Future Technology Devices International, Ltd
> FT232 USB-Serial (UART) IC
> Bus 005 Device 002: ID 0403:6001 Future Technology Devices International, Ltd
> FT232 USB-Serial (UART) IC
You should already have some links in /dev/serial/ right? Why not use
those?
Otherwise you are going to have to use the USB path, but if USB
enumerates them in a different order next time you boot, the paths are
going to be different. You should bug your vendor about putting unique
serial numbers in them, that's the only "real" way to do this correctly,
sorry.
Hope this helps,
greg k-h
next prev parent reply other threads:[~2014-01-15 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 14:15 udev: attributes rules to identical devices Theo
2014-01-15 14:26 ` Greg KH [this message]
2014-01-15 15:11 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140115142654.GA3984@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).