From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Greg KH" <greg@kroah.com>
Cc: "Joerg Pommnitz" <pommnitz@yahoo.com>,
linux-kernel@vger.kernel.org,
linux-usb-users@lists.sourceforge.net
Subject: Re: [Linux-usb-users] Stable identification of identical USB hardware
Date: Tue, 19 Jun 2007 11:09:05 +0200 [thread overview]
Message-ID: <3ae72650706190209i77b577aaue7324825587358b4@mail.gmail.com> (raw)
In-Reply-To: <20070618203312.GA13990@kroah.com>
On 6/18/07, Greg KH <greg@kroah.com> wrote:
> On Mon, Jun 18, 2007 at 08:35:35AM -0700, Joerg Pommnitz wrote:
> > I want to be able to distinguish between two (or more) mostly
> > identical USB serial devices. The devices in question are UMTS modems.
> > AFAIK they are identical except for the SIM card and the point of
> > attachment. Externally the cards are CardBus devices with an
> > integrated USB host adapter. The actual UMTS device is (internally)
> > connected to the USB host adapter.
> >
> > If I have to cardbus sockets, how do I get from what I know ("the card
> > is in socket 0") to "I have to talk to ttyUSB2 to talk to the card"? I
> > suspect I have to follow the thread from /sys/bus/pci to
> > /sys/bus/usb/devices, but how exactly?
>
> Walk up the "chain" of devices in sysfs and in udev. The udev man pages
> and documentation should show you how to do this. If you have specific
> questions about this, please ask them on the linux-hotplug-devel mailing
> list.
This should create a symlink for the serial device in the first slot:
KERNEL="ttyUSB*", SUBSYSTEMS=="pcmcia", KERNELS=="0.0",
SYMLINK+="serial-slot0"
You find the keys used with udevinfo. Here is an example for a PCMCIA
CF Memory card:
udevinfo --attribute-walk --name hda4
...
looking at device '/block/hda/hda4':
KERNEL=="hda4"
SUBSYSTEM=="block"
...
looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0/0.0':
KERNELS=="0.0"
SUBSYSTEMS=="pcmcia"
DRIVERS=="ide-cs"
...
looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0':
KERNELS=="0000:04:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="yenta_cardbus"
...
Kay
prev parent reply other threads:[~2007-06-19 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 15:35 Joerg Pommnitz
2007-06-18 17:00 ` Michael Mauch
2007-06-18 17:13 ` Lee Revell
2007-06-18 20:33 ` [Linux-usb-users] " Greg KH
2007-06-19 9:09 ` Kay Sievers [this message]
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=3ae72650706190209i77b577aaue7324825587358b4@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-users@lists.sourceforge.net \
--cc=pommnitz@yahoo.com \
/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
all inboxes | Powered by JetHome®