View previous topic :: View next topic |
Author |
Message |
Mr.QNo n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Mar 2005 Posts: 74
|
Posted: Sun Jun 25, 2006 1:03 pm Post subject: [solved] udev, Palm PDA, symlink to the second device |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
jamapii l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/170100631249065103292e6.jpg)
Joined: 16 Sep 2004 Posts: 637
|
Posted: Sun Jun 25, 2006 8:37 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Headrush Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/111332295641fa913c28fea.jpg)
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Sun Jun 25, 2006 8:48 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Mr.QNo n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Mar 2005 Posts: 74
|
Posted: Mon Jun 26, 2006 11:41 am Post subject: |
|
|
That's the trick! I never had thought about making symlinks of both devices! Thanks a lot! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
J3N7iL Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/174821474344a50d2721efb.jpg)
Joined: 24 Sep 2005 Posts: 169 Location: Chicago
|
Posted: Sun Jul 09, 2006 1:16 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|