linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multi-serial USB Device
@ 2010-01-30 18:05 Paul Dugas
  2010-01-30 18:25 ` Paul Bender
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Paul Dugas @ 2010-01-30 18:05 UTC (permalink / raw)
  To: linux-hotplug

First, please point me where I should be asking if this is not the
place.  Thanks.

I've got a number of USB devices I need to connect to a data-logging
machine.  Each device presents as 3 USB serial ports which are
properly recognized and setup as ttyUSB[0-2] once I added the right
vendor and product numbers to the module loader configs.  When I
connect the second device, I get ttyUSB[3-5].  I've been able to setup
udev rules that recognize the serial numbers for each of the devices
and can setup symlinks; i.e. ttyLogger1USB[0-2] -> ttyUSB?.
Something like so...

    KERNEL="ttyUSB*", SYSFS{serial}="111", SYMLINK+="ttyLogger1USB%n"
    KERNEL="ttyUSB*", SYSFS{serial}="222", SYMLINK+="ttyLogger2USB%n"
    KERNEL="ttyUSB*", SYSFS{serial}="333", SYMLINK+="ttyLogger3USB%n"

My hitch is that the %n values on the end of the SYMLINK setting
result in 0-2 for the first logger found, 3-5 for the second, etc.  I
really want them to be 0-2 for all of the loggers.  But, looking at
the udevinfo for the 3 ports on one logger, they're identical.

I tried adding a PROGRAM setting to run a little script that looked to
count the /dev/ttyLogger1USB* devices had already been created and it
always returned 0.  Are the device files and symlinks created in
parallel or in bulk at the end and thus this approach wouldn't work?

I tried another PROGRAM that opened the port and polled the logger to
see what port this was (that's supported by the device's protocol) but
the device file didn't exist yet.  Is there a way to trigger this
approach after the device file has been created? Is there a way to
temporarily create the device in the script instead?

Anyone got a suggestion on how to solve this?

Paul

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-01-31  2:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 18:05 Multi-serial USB Device Paul Dugas
2010-01-30 18:25 ` Paul Bender
2010-01-30 18:27 ` David Zeuthen
2010-01-30 18:34 ` Greg KH
2010-01-30 18:50 ` Paul Dugas
2010-01-30 18:50 ` Paul Dugas
2010-01-30 18:59 ` Paul Dugas
2010-01-30 19:58 ` David Zeuthen
2010-01-30 20:36 ` Paul Dugas
2010-01-31  0:47 ` Greg KH
2010-01-31  1:27 ` Paul Dugas
2010-01-31  2:55 ` Greg KH

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).