Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] udev, Palm PDA, symlink to the second device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Mr.QNo
n00b
n00b


Joined: 21 Mar 2005
Posts: 74

PostPosted: Sun Jun 25, 2006 1:03 pm    Post subject: [solved] udev, Palm PDA, symlink to the second device Reply with quote

Hi all,

I use a Palm Treo 600. When pushing the HotSync button, udev makes two devices, e.g. /dev/ttyUSB0 and /dev/ttyUSB1. The second one is appropriate for syncing.

Sometimes, i use a card reader, which shows up as /dev/ttyUSBx. And in future, i'll possibly use still more ttyUSB devices. So i can't rely on ttyUSB1 being the device i need.

So what i want is an udev rule producing a /dev/pilot symlink pointing to the right device, regardless which number it has. I found some rules that link to the highest ttyUSB device with odd numbers or with even numbers, but those rules are inappropriate, because i really can't make any predictions about that number.

Is this possible with udev? Might it be necessary to use an external program additionaly?

TIA
Chris


Last edited by Mr.QNo on Mon Jun 26, 2006 11:42 am; edited 1 time in total
Back to top
View user's profile Send private message
jamapii
l33t
l33t


Joined: 16 Sep 2004
Posts: 637

PostPosted: Sun Jun 25, 2006 8:37 pm    Post subject: Reply with quote

I found this
Code:
SYSFS{product}="Palm Handheld", KERNEL="ttyUSB*", NAME="tts/USB%n", SYMLINK="pilot%e", GROUP="users", MODE="0660"

in my /etc/udev/rules.d/10-local.rules
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Jun 25, 2006 8:48 pm    Post subject: Reply with quote

Or for any USB device in general, use lsusb to find the idVendor and idProduct and add a rule like this
Code:
BUS="usb", SYSFS{idVendor}="067b", SYSFS{idProduct}="3507", NAME="%k", SYMLINK="pilot_%s{bInterfaceNumber}"

Of course change the IDs to match your device. Now the your device will have the static name /dev/pilot_00 and /dev/pilot_01 which you can use.

The advantage of using the Vendor and Product IDs are from time to time the name variable changes with kernel changes, these two should be constant.
Back to top
View user's profile Send private message
Mr.QNo
n00b
n00b


Joined: 21 Mar 2005
Posts: 74

PostPosted: Mon Jun 26, 2006 11:41 am    Post subject: Reply with quote

That's the trick! I never had thought about making symlinks of both devices! Thanks a lot!
Back to top
View user's profile Send private message
J3N7iL
Apprentice
Apprentice


Joined: 24 Sep 2005
Posts: 169
Location: Chicago

PostPosted: Sun Jul 09, 2006 1:16 pm    Post subject: Reply with quote

Mr.QNo

It sounds like your accessing the Palm like a external HD
I have a Palm zire, is it possible to access the device without software?
_________________
For Sale: Parachute. Only used once, never opened, small stain.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum