EasyPalmDeviceSetup

出自Ubuntu中文

目录

EasyPalmDeviceSetup


原文出处:https://wiki.ubuntu.com/EasyPalmDeviceSetup?action=edit

原文作者:UbuntuWiki

授权许可:

翻译人员:leal

校对人员:CaoXiaoboBUAA

贡献者:lisir

适用版本:Ubuntu 5.10 文章状态:完成


EasyPalmDeviceSetup

Draft
草稿

Easy Palm Device Setup

简单配置 Palm 设备

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...

大部分其它关于如何在 Linux 上使用 Palm 设备的指南都涉及 HotSync 按钮魔术(Need Improvement)。本文将说明如何来使用你的 Palm 设备,甚至无需考虑 /dev/ttyUSB1。来看看 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 all options
    • Save the file, close gedit and close the terminal window.

保存该文件,关闭gedit及终端窗口。

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.

就这样了。我知道的所有Palm同步应用程序都会在/dev/pilot查找设备。至少Gnome-pilot确是如此。上面这个简单修补可以让你的Palm设备即插即用。

Extra Information

附加信息

Information for this article comes from

这篇文章的信息来自

Writing UDEV Rules


Possible future TODO:

将来可能的TODO:

    • See if newer "PalmOne", Handspring, or Treo devices have different product names, requiring more lines in the file.

看看更新的"PalmOne“、Handspring或Treo设备是否会采用不同的product名称,若是则需要在文件中添加额外设置行。

    • See if ttyUSB* is good enough for the majority, or if we need to use ttyUSB[13579].

看看ttyUSB*对于绝大部分该设备是否够用,或者我们需要使用ttyUSB[13579].

Notes from another user

来自其它用户的注释 lisir 翻译以下部分

    • 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.
    • 当按下“同步”(HotSync)键时,所有的Palm掌上电脑会建立两个连结,大部分情况下为/dev/ttyUSB0和/dev/ttyUSB1。如果你连结有其它USB设备,你的连结可能会不一样。
    • 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.
    • 对大部分Palm机器而言,数据在建立的第二个连结(例如/dev/ttyUSB1)上进行交换。也有少数Palm机器使用第一个连结进行数据交换。对于你的特定机器你可能需要两个都尝试一下以找出哪个连结对你是适用的。
    • 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]".
    • 由于udev一直尝试建立指向/dev/ttyUSB0的符号链结/dev/pilot,我无法使用"ttyUSB*"核心选项(译注:疑为通配表达式)。我必须指定"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.
    • 在建立规则前如果你的同步不起作用,检查一下你有没有一个类似的与Palm设备有关的规则。在我的Ubuntu5.10中情况是这样的:我在udev规则文件中除了基本规则外还有两个自定制规则(在以前的尝试中建立的)。现在为了使它工作,我不得不在udev树中删除了所有与Palm与关的规则(rule)。然後如前面说明的新建了一个。之後按下同步(Hotsync)按钮并执行“ls -l /dev/ttyUSB*"或“ls -l /dev/pilo*”来检验一下效果。如果信道正常工作了肯定会有些提示的。如果你做好了,就继续用jpilot/gnomepilot/kpilot或其它软件操作。
    • 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).
    • 为了让我的Palm T5能同步,我在上述建立的文件(gksudo gedit /etc/udev/rules.d/010-custom.rules)中加了一行(BUS="usb", SYSFS{product}="palmOne Handheld*", KERNEL="ttyUSB[13579]", SYMLINK="pilot)。(注意:括号内的才是您需要实际填入的)这是参考的这个链结(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.
    • 使用上述链结的信息,我成功地使我的Treo650在Ubuntu5.10(Breezy Badger)上使用。我将010-custom.rules文件中的该行修改为:BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[13579]*", SYMLINK=="treo"。然後运行Palm设备设置。
    • 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.
    • 我使用的是Breeze Badger,我在使用上述链结的信息同步时遇到了麻烦。它只同步一次就不再能同步了,或者它可能随机地可以同步但不是我尝试的每次都可以同步。我转用jpilot并将010-custom.rules文件修改为:BUS=="usb", SYSFS{product}=="PalmOne Handheld*", KERNEL=="ttyUSB*", NAME{ignore_remove}=="treo", MODE=="666" 。这对Treo650起了作用,现在它每次都可以同步了。