特殊:Badtitle/NS100:PalmDeviceSetup

来自Ubuntu中文
Wikibot留言 | 贡献2007年12月6日 (四) 15:37的版本
跳到导航跳到搜索

{{#ifexist: :PalmDeviceSetup/zh | | {{#ifexist: PalmDeviceSetup/zh | | {{#ifeq: {{#titleparts:PalmDeviceSetup|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:PalmDeviceSetup|1|-1|}} | zh | | }}

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

  1. Open a terminal window by going to Applications -> System Tools -> Terminal
  2. 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
  1. 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"
  1. Save the file, close gedit and close the terminal window.
  2. For Ubuntu 7.04 (Feisty Fawn) and 7.10 (Gutsy Gibbon) when still not working add the visor module to etc/modules.

gksudo gedit /etc/modules Add after last line

visor and save the file. Restart your computer.

You can load the module immediately without restarting by issueing

sudo modprobe visor This worked fine for jpilot. First start the synchronizing on the palm, after that in jpilot.

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!
  • Important for all Treo 650 users trying to sync with Evolution: before doing anything, you should make sure that you add the lines and <device vendor_id="0830" product_id="0061" /> to your /usr/share/gnome-pilot/devices.xml file. Without this line, your Treo will behave erratically when syncing and may crash Gnome Pilot (especially if you are trying to sync tasks).

Treo 680 on Feisty

I found that Feisty comes with all the right settings; notably no changes are needed to the rules files. However, the rules are set up such that the link /dev/pilot is created dynamically when the OS recognizes the palm device, at the time the hotsync button is pressed. This has complications for the sync software such as kpilot. The sync software (notably the daemon that's opening the device node) must be started _after_ the hotsync button is pressed. Otherwise the OS might reassign the device node and the daemon will be looking at a stale device node. This can be avoided by having the sync software talk to /dev/ttyUSB0 directly, rather than via the /dev/pilot, but if you use multiple serial devices, then they might confuse each other, as the OS will pick the next free device node, e.g. ttyUSB1, ...


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