Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cant connect to my palm pilot [SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Wed Aug 02, 2006 8:12 am    Post subject: cant connect to my palm pilot [SOLVED] Reply with quote

it appears when hotsync is pressed
Code:
ravity tmp # lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 413c:3010 Dell Computer Corp. Optical Wheel Mouse
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 005: ID 0830:0060 Palm, Inc. Palm Tungsten T / Zire 71
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
gravity tmp #                       


but no nodes are produced
all i get in dmesg is this
Code:

usb 2-1: new full speed USB device using uhci_hcd and address 5
gravity tmp #             


it automatically detected a USB mouse , so i think the USB setup is OK

how do i get it make ttyUSB0 ?
_________________
join the optout - http://nhsconfidentiality.org


Last edited by thecooptoo on Fri Aug 11, 2006 9:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
sternklang
Veteran
Veteran


Joined: 10 Sep 2005
Posts: 1641
Location: Somewhere in time and space

PostPosted: Wed Aug 02, 2006 7:53 pm    Post subject: Reply with quote

I think you need to setup a custom udev rule to make this work. Here's mine, in /etc/udev/rules.d/10-local.rules:
Code:
BUS=="usb", SYSFS{product}=="Palm Tungsten C", NAME="%k", SYMLINK="pilot", GROUP="wheel"

This works for me. I sync to a Windows VMWare guest, because I have software on the Palm that has no linux equivalent, but the "pilot" symlink gets created so it works. You may want to change the product name and possibly the symlink name.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Wed Aug 02, 2006 8:50 pm    Post subject: Reply with quote

Im sure its a udev problem, but i cant get a udev rule that works .
Once I modprobed visor i get
Code:
visor 3-1:1.0: Handspring Visor / Palm OS converter detected
usb 3-1: Handspring Visor / Palm OS converter now attached to ttyUSB0
usb 3-1: Handspring Visor / Palm OS converter now attached to ttyUSB1
paul@gravity ~ $                                                         


this , as root , connects
Code:
 pilot-xfer -p /dev/ttyUSB1 -l   

but as user
Code:
paul@gravity ~ $ pilot-xfer -p /dev/ttyUSB1 -l

   Please check the permissions on /dev/ttyUSB1..
   Possible solution:

        chmod 0666 /dev/ttyUSB1

   Unable to bind to port: /dev/ttyUSB1
   Please use --help for more information

paul@gravity ~ $     


ive been trying different options for the udev rules
Code:

# pilot/palm devices
#KERNEL=="pilot",       NAME="%k", GROUP="uucp"
#BUS=="usb", SYSFS{product}=="Palm Tungsten ", NAME="%k", SYMLINK="pilot", GROUP="users", OWNER="paul", MODE="0666"
#GROUP="wheel" doesnt work
 #http://cvs.codeyard.net/kpilot/faq.php
#KERNEL="ttyUSB*",  NAME="%k",  SYMLINK="pilot",  GROUP="uucp",  MODE="0666"
KERNEL="ttyUSB*", NAME="%k", SYMLINK="pilot", OWNER="paul" GROUP="users", MODE="O666"

ive tried with and without MODE="0666" and with a variety of owners/groups
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Aug 02, 2006 9:59 pm    Post subject: Reply with quote

This works great for me with udev-104-r11 in kernel 2.6.20 for a Palm Tungsten T3:

Setup

Kernel:
Code:
USB_SERIAL_VISOR=y


Programs:
Code:
emerge pilot-link rsync


Permissions:
Code:
gpasswd -a <you> usb
(Then log out, for the group change to take effect.)

I use the latest version of pilot-link:
/usr/local/portage/app-pda/pilot-link/pilot-link-0.12.2.ebuild (also see bugzilla for ebuilds)
Code:
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils perl-module

MY_PV=${PV/_/-}
MY_P=${PN}-${MY_PV}

DESCRIPTION="Suite of tools for moving data between a Palm device and a desktop"
HOMEPAGE="http://www.pilot-link.org/"
SRC_URI="http://downloads.pilot-link.org/${MY_P}.tar.bz2"

LICENSE="|| ( GPL-2 LGPL-2 )"
SLOT="0"
KEYWORDS="alpha amd64 ia64 ~ppc ~sparc ~x86"
IUSE="perl java tcltk python png readline"

DEPEND="virtual/libc
   sys-libs/ncurses
   perl? ( dev-lang/perl )
   java? ( virtual/jre )
   tcltk? ( dev-lang/tcl dev-tcltk/itcl dev-lang/tk )
   python? ( dev-lang/python )
   png? ( media-libs/libpng )
   readline? ( sys-libs/readline )"

S=${WORKDIR}/${MY_P}

src_compile() {
   local myconf="--includedir=/usr/include/libpisock"

   use java \
      && myconf="${myconf} --with-java=yes" \
      || myconf="${myconf} --with-java=no"

   use perl \
      && myconf="${myconf} --with-perl=yes" \
      || myconf="${myconf} --with-perl=no"

   use python \
      && myconf="${myconf} --with-python=yes" \
      || myconf="${myconf} --with-python=no"

   use tcltk \
      && myconf="${myconf} --with-tcl=/usr/lib --with-itcl=yes --with-tk=yes" \
      || myconf="${myconf} --with-tcl=no --with-itcl=no --with-tk=no"

   use png && myconf="${myconf} --with-libpng=/usr"

   use readline \
      && myconf="${myconf} --with-readline=yes" \
      || myconf="${myconf} --with-readline=no"

   econf \
      ${myconf} \
      --enable-conduits \
      --enable-threads \
      --enable-libusb \
      || die
   # java fails w/emake
   make || die

   if use perl ; then
      cd "${S}"/bindings/Perl
      perl-module_src_prep
      perl-module_src_compile
   fi
}

src_install() {
   make DESTDIR="${D}" install || die

   dodoc ChangeLog README doc/README* doc/TODO NEWS AUTHORS

   if use perl ; then
      cd "${S}"/bindings/Perl
      perl-module_src_install
   fi
}


To be able to back up the Palm's SD card if you have one (as opposed to the Palm's RAM), buy and install Card Export 2 on the Palm.

Files

/etc/fstab entry for the SD card:
Code:
/dev/pilot-card   /mnt/pilot-card  vfat  user,noauto,noatime  0 0


~/bin/backuppalmcard
Code:
#!/bin/sh

# Is run automatically, thanks to custom udev rules
# Uses /etc/fstab and /etc/udev/rules.d/91-local.rules

ME="brebs"
DEST="/home/${ME}/palm/backup/card"
MNT="/mnt/pilot-card"

echo "Waiting for /dev/pilot-card"
until [[ -e "/dev/pilot-card" ]] ; do
   sleep 1
done
echo "Syncing Palm card..."
echo

# Necessary pause - for slow Palm, presumably
sleep 1

# Create dirs
if [[ ! -d "${MNT}" ]] ; then
   mkdir "${MNT}"
   chmod 770 "${MNT}"
   chown root:usb "${MNT}"
fi
mkdir -p "${SYNC_DIR}"

mount "${MNT}" && rsync -ralpogt --delete --force "${MNT}"/ "${SYNC_DIR}"
# Necessary pause - for slow Palm, presumably
sleep 1
umount "${MNT}"


~/bin/backuppalm
Code:
#!/bin/sh

# Is run automatically, thanks to custom udev rules
# Uses /etc/udev/rules.d/91-local.rules

ME="brebs"
SYNC_DIR="/home/${ME}/palm/backup/ram"

# From http://www.clasohm.com/blog/one-entry?entry%5fid=12096
echo "Waiting for /dev/pilot to exist..."
until [[ -e "/dev/pilot" ]] ; do
   sleep 1
done
echo "Syncing Palm RAM (but not card)..."
echo

#export PILOTPORT="/dev/pilot"
# Uses libusb instead of visor kernel module
# http://code.pilot-link.org/README.libusb
export PILOTPORT="usb:"
# The H is intentional, apparently
#export PILOTRATE="H115200"

mkdir -p "${SYNC_DIR}"
/usr/bin/pilot-xfer --exclude "/home/${ME}/palm/exclude.lst" -s "${SYNC_DIR}"

echo "Now run backuppalmcard"


~/palm/exclude.lst
Code:
Splash-splH
PalmSGHiResFonts
ImgFile-Foto
Jpeg-Foto
PACE
PhotosDefaultDB-Foto
WordToGoFonts
SlideshowFonts
PMHDB
PMNDB
PIMsSupportStatus-pdmE


/etc/udev/rules.d/91-local.rules
Code:
# For Palm, from http://www.reactivated.net/writing_udev_rules.html
# Has 2 ttys, apparently - don't care about the first one.
# "pilot" is the default used by pilot-xfer.
SUBSYSTEMS=="usb", ATTRS{product}=="Palm Handheld*", KERNEL=="ttyUSB*[1,3,5,7,9]", ACTION=="add", SYMLINK+="pilot", GROUP="usb", MODE="0660", RUN+="/home/brebs/bin/backuppalm"
SUBSYSTEMS=="usb", ATTRS{product}=="Palm Handheld*", KERNEL=="ttyUSB*[0,2,4,6,8]", ACTION=="add", SYMLINK+="pilot-other", GROUP="usb", MODE="0660"
SUBSYSTEMS=="scsi", ATTRS{model}=="Card Export", ACTION=="add", SYMLINK+="pilot-card", GROUP="usb", MODE="0660", RUN+="/home/brebs/bin/backuppalmcard"


Change "brebs" to your username, of course :wink:

Backing up

Put the Palm in its cradle and press the hotsync button. The RAM hotsync will occur automatically.

To back up the SD card, run "Card Export" on the Palm and click "connect to desktop". After a couple of seconds, the "read" indicator will flash green, indicating that the sync is occurring. When it stops, click "disconnect".

Edit: Changed BUS to SUBSYSTEMS in udev rules, to work with udev-120.


Last edited by PaulBredbury on Sat May 17, 2008 6:53 am; edited 7 times in total
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Fri Aug 11, 2006 9:30 pm    Post subject: Reply with quote

thanks [/url] solved ( eventually)
this is what works
Code:
gravity paul # cat /etc/udev/rules.d/50-udev.rules  |grep pilot
#       pilot/palm devices
# "pilot" is the default used by pilot-xfer.
BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[1,3,5,7,9]", ACTION=="add", SYMLINK="pilot", GROUP="usb", MODE="0660", OWNER="paul"
BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[0,2,4,6,8]", ACTION=="add", SYMLINK="pilot-other", GROUP="usb", MODE="0660"

_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Aug 11, 2006 9:38 pm    Post subject: Reply with quote

Edit the file I specified, not udev's file (which changes with every new release of udev). And yourself to the appropriate group, rather than define the owner.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Aug 12, 2006 8:21 am    Post subject: Reply with quote

Code:
gravity rules.d # ls -la
total 32
drwxr-xr-x 2 root root  4096 Aug 12 09:18 .
drwxr-xr-x 4 root root  4096 May  5 07:12 ..
-rw-r--r-- 1 root root   385 Jun 28 00:18 05-udev-early.rules
-rw-r--r-- 1 root root 12639 Aug 11 22:28 50-udev.rules
-rw-r--r-- 1 root root    35 Apr 18 22:46 hsf.rules
gravity rules.d #                                 


Even when I havent got one ?
How does udev get the file names ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Aug 12, 2006 3:39 pm    Post subject: Reply with quote

equery belongs 50-udev.rules shows that the file belongs to udev :wink:

/etc/udev/udev.conf contains:
Code:
# udev_rules - The name and location of the udev rules file
udev_rules="/etc/udev/rules.d/"
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Aug 12, 2006 4:58 pm    Post subject: Reply with quote

so do i make a /etc/udev/rules.d/91-local.rules file and put the palm stuff ( and what else??) in there ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
snakehsu
n00b
n00b


Joined: 06 Oct 2007
Posts: 10

PostPosted: Wed Oct 10, 2007 11:24 am    Post subject: Reply with quote

I was looking for a practical way to sync my Treo 650 using jpilot. Your udev rules file works for me:

PaulBredbury wrote:

Code:
# For Palm, from http://www.reactivated.net/writing_udev_rules.html
# Has 2 ttys, apparently - don't care about the first one.
# "pilot" is the default used by pilot-xfer.
BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB*[1,3,5,7,9]", ACTION=="add", SYMLINK+="pilot", GROUP="usb", MODE="0660", RUN+="/home/brebs/bin/backuppalm"
BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB*[0,2,4,6,8]", ACTION=="add", SYMLINK+="pilot-other", GROUP="usb", MODE="0660"
BUS=="scsi", SYSFS{model}=="Card Export", ACTION=="add", SYMLINK+="pilot-card", GROUP="usb", MODE="0660", RUN+="/home/brebs/bin/backuppalmcard"



Although I only used the first two lines and changed them a bit (because I do not directly use pilot-link or your scripts):

Code:

BUS=="usb", SYSFS{product}=="Palm *", KERNEL=="ttyUSB*[1,3,5,7,9]", ACTION=="add", SYMLINK+="pilot", GROUP="usb", MODE="0660"
BUS=="usb", SYSFS{product}=="Palm *", KERNEL=="ttyUSB*[0,2,4,6,8]", ACTION=="add", SYMLINK+="pilot-other", GROUP="usb", MODE="0660"


My phone in lsusb reads "Palm, Inc" so I deleted "Handheld".

I set the port in jpilot to /dev/ttyUSB1 and it works. Thanks.

However, if I set "usb:" in jpilot it just doesn't work, complaining about binding problems:

Code:

Check your serial port and settings
Exiting with status SYNC_ERROR_BIND


I checked my /dev, and find that I have /dev/bus/usb/* and /dev/usbdev* at the same time. I am using kernel 2.6.22 and udev says it only uses /dev/bus/usb/. However when I press sync button on my Treo I can see some more /dev/usbdev* files, with permission 660 and user:group=root:root. So I started jpilot as root trying to use "usb:" but this time it says there's no such file. Any ideas?

Related software and versions:
jpilot 0.99.7-r1
libusb 0.1.12-r1
udev-114
pilot-xfer 0.11.8
_________________
** Happy Hacking **
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Jul 03, 2008 12:57 pm    Post subject: Reply with quote

The Palm TX triggers a udev "add" event when it's turned on, rather than only when the hotsync button is pressed (as with the Palm T3 in its cradle), so the udev rule to RUN+="blah/backuppalm" should be removed - run backuppalm manually when the hotsync button has been pressed, instead.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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