* Re: An interesting problem
2006-06-20 15:40 An interesting problem Ian Pilcher
@ 2006-06-20 16:18 ` Greg KH
2006-06-20 16:56 ` Ian Pilcher
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2006-06-20 16:18 UTC (permalink / raw)
To: linux-hotplug
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 :)
good luck,
greg k-h
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: An interesting problem
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ian Pilcher @ 2006-06-20 16:56 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> 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 :)
But how can I write this rule? Assume that I may (or may not) have some
other USB serial device plugged in, so ttyUSB1 isn't necessarily the
correct port. How can I identify the "higher" port of the two that get
created?
Thanks!
--
====================================
Ian Pilcher i.pilcher@comcast.net
====================================
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: An interesting problem
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
2006-06-21 2:30 ` Andrey Borzenkov
4 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2006-06-20 17:10 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 20 June 2006 20:56, Ian Pilcher wrote:
> Greg KH wrote:
> > 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 :)
>
> But how can I write this rule? Assume that I may (or may not) have some
> other USB serial device plugged in, so ttyUSB1 isn't necessarily the
> correct port. How can I identify the "higher" port of the two that get
> created?
>
check that it is visor and ttyUSB(n-1) on the same USB device exists?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEmCv9R6LMutpd94wRAnpCAKC2dQOaATVvdyxpJDNl0fvUkJgNIQCeM8zn
U1XYP6OMtK8dI0hS2+tm4bY=0g2Z
-----END PGP SIGNATURE-----
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: An interesting problem
2006-06-20 15:40 An interesting problem Ian Pilcher
` (2 preceding siblings ...)
2006-06-20 17:10 ` Andrey Borzenkov
@ 2006-06-20 22:31 ` Olivier Blin
2006-06-21 2:30 ` Andrey Borzenkov
4 siblings, 0 replies; 6+ messages in thread
From: Olivier Blin @ 2006-06-20 22:31 UTC (permalink / raw)
To: linux-hotplug
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: An interesting problem
2006-06-20 15:40 An interesting problem Ian Pilcher
` (3 preceding siblings ...)
2006-06-20 22:31 ` Olivier Blin
@ 2006-06-21 2:30 ` Andrey Borzenkov
4 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2006-06-21 2:30 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 21 June 2006 02:31, Olivier Blin wrote:
> 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.scrip
>t?rev=1.7&content-type=text/x-cvsweb-markup It's run from this rule:
> KERNEL="ttyUSB[13579]*",
and what if you have another unrelated ttyUSB0 so visor numbering starts from
1?
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEmK9WR6LMutpd94wRApGuAJ0ar/GSLiMcDvCfu9u5LbKYUI7LzwCgmAHN
aUPZUbAZyu4afT7Lj1p2AOY=sLeT
-----END PGP SIGNATURE-----
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread