linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Blin <oblin@mandriva.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: An interesting problem
Date: Tue, 20 Jun 2006 22:31:38 +0000	[thread overview]
Message-ID: <m3irmva27p.fsf@dynamo.mandriva.com> (raw)
In-Reply-To: <e794u0$ehs$1@sea.gmane.org>

Greg KH <greg@kroah.com> writes:

> On Tue, Jun 20, 2006 at 10:40:48AM -0500, Ian Pilcher wrote:
>> Here's one that's kind of interesting (to me, anyway).  My Palm Treo650
>> creates two ttyUSB devices when I plug it in and hit the sync button.
>> The higher numbered of the two is the one that needs to be used for
>> syncing.  (I assume that the lower numbered port represents a modem.)
>> 
>> How would you go about writing a udev rule to link /dev/pilot to the
>> correct port?
>
> There is no "generic" way to do this, due to the wide range of palm
> devices, and the proper connection port for them.  Best thing to do is
> just write a rule for your device and be happy it works for you :)

Here's the hack we've been using in Mandriva for years:
http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/dynamic/scripts/visor.script?rev=1.7&content-type=text/x-cvsweb-markup
It's run from this rule:
KERNEL="ttyUSB[13579]*", RUN+="/etc/dynamic/scripts/visor.script"

It contains a list of IDs that requires the "device swap" for
/dev/pilot. It's probably far from being perfect, and could be
simplified a lot with today's udev, but you get the idea.

Regards

-- 
Olivier Blin - Mandriva


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2006-06-20 22:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 15:40 An interesting problem Ian Pilcher
2006-06-20 16:18 ` Greg KH
2006-06-20 16:56 ` Ian Pilcher
2006-06-20 17:10 ` Andrey Borzenkov
2006-06-20 22:31 ` Olivier Blin [this message]
2006-06-21  2:30 ` Andrey Borzenkov

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=m3irmva27p.fsf@dynamo.mandriva.com \
    --to=oblin@mandriva.com \
    --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).