个人工具

UbuntuHelp:PalmDeviceSetup

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 15:29的版本 (新页面: {{From|https://help.ubuntu.com/community/PalmDeviceSetup}} {{Languages|UbuntuHelp:PalmDeviceSetup}} == Easy Palm Device Setup == Most other instructions on how to use Palm devices on ...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


Easy Palm Device Setup

Most other instructions on how to use Palm devices on Linux involve HotSync Button voodoo. This document will explain how to use your Palm device without having to even think about /dev/ttyUSB1. Behold the power of UDEV...

Instructions

    • Open a terminal window by going to Applications -> System Tools -> Terminal
    • Type the following line: (enter your password when asked)
gksudo gedit /etc/udev/rules.d/10-custom.rules
        • For Ubuntu 5.10 (Breezy Badger) you may want to use a file name of 010-custom.rules to ensure that this file is read before 020_permissions.rules
    • Insert the following line into the empty file:
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
        • For Ubuntu 5.10 (Breezy Badger) you may need to use "==" instead of "=" for some options
BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[13579]", NAME="pilot", GROUP="uucp", MODE="0660"
    • Save the file, close gedit and close the terminal window.
    • For Ubuntu 7.04 (Feisty Fawn) when still not working add the visor module to etc/modules. Then load the module by issueing
sudo modprobe visor

or restart your computer.

Conclusion

There you go. Every Palm synchronizing application I know of looks for the device at /dev/pilot. Gnome-pilot does, for sure. This simple fix allows your Palm device to finally be plug-and-play.

Extra Information

Information for this article comes from Writing UDEV Rules

Possible future TODO:

    • See if newer "PalmOne", Handspring, or Treo devices have different product names, requiring more lines in the file.
    • See if ttyUSB* is good enough for the majority, or if we need to use ttyUSB[13579].

Notes from other users

    • All Palm handhelds create 2 connections when the HotSync button is pushed. In most cases these are /dev/ttyUSB0 and /dev/ttyUSB1. Your connections may vary, depending on what other USB devices you have connected.
    • For most Palm devices, the data communication takes place on the second connection created (i.e. /dev/ttyUSB1). There are a handful of Palm devices which use the first connection to do data communication. You may have to try both to discover which is appropriate for your particular device. I once found a list specifying which devices went which way; alas I have lost it.
    • I could not use the "ttyUSB*" kernel option, as udev kept creating the /dev/pilot symlink pointing to /dev/ttyUSB0. I had to specify "ttyUSB[13579]".
    • Before creating too quickly a rule if your sync doesn't work, check if you don't already have a similar rule or line related to a Palm device. It was the case for me in Ubuntu 5.10. I had 2 custom rules (created before, in previous attempts) plus a basic one in the udev.rules file. To make it work, I had to delete all rules or lines related to Palm in my udev tree. Then create a brand new one as explained. Then test the results in pressing the Hotsync button and doing a ls -l /dev/ttyUSB* or ls -l /dev/pilo*. Something must show up if the rule is working. Once you're done go ahead for jpilot/gnomepilot/kpilot or wathever.
    • To get my Palm T5 to sync I added line (BUS="usb", SYSFS{product}="palmOne Handheld*", KERNEL="ttyUSB[13579]", SYMLINK="pilot), without (), to above described created file (gksudo gedit /etc/udev/rules.d/010-custom.rules). This was done with information found on link (http://andyspace.me.uk/node/250).
    • Using the information from the link provided above I was able to setup my Treo650 to work on Ubuntu 5.10 (Breezy Badger). I ammended the line in the "010-custom.rules" file to the following: BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[13579]*", SYMLINK=="treo". Then run the PalmDevices setup.
    • I'm using Breeze Badger and I was having trouble syncing with all the information provided on this link. It would sync once and then not again, or maybe it was random but it didn't sync every time I tried. I switched to jpilot and changed the "010-custom.rules" file to: BUS=="usb", SYSFS{product}=="PalmOne Handheld*", KERNEL=="ttyUSB*", NAME{ignore_remove}=="treo", MODE=="666". That worked like a charm for the Treo 650. Now it syncs every time.
    • I'm using Edgy with Treo 650. I created a file named "/etc/udev/rules.d/010-custom.rules" containing 'BUS=="usb", SYSFS{product}=="*[vVisor]*", KERNEL=="ttyUSB[13579]", SYMLINK+="pilot", GROUP="dialout", MODE="0660"'. I'm not sure if it's necessary, but I then did "/etc/init.d/udev restart". Even though it makes no sense, synchronization wasn't possible until I upped the speed in JPilot to 57600. Yeah, I know--it shouldn't matter--but it does. Now it syncs every time. If you're fighting with this, make sure you "sudo tail -f /var/log/messages" and keep an eye on "ls -l /dev/pilot". Also, make sure you're user has dialout permissions.
    • Just a note on the difference between "==" and "=" in the above. The former is used for equality comparisons (as in BUS, SYSFS, & KERNEL), whereas the latter is for assignments (as in NAME & MODE). This is a very important distinction which if ignored will yield a rather elaborate udev no-op line in your rules file!

[[UbuntuHelp:]] [[UbuntuHelp:]]