Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141659 - PalmOS USB Device Detection Broken in sys-fs/udev
Summary: PalmOS USB Device Detection Broken in sys-fs/udev
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: udev-meta
  Show dependency tree
 
Reported: 2006-07-24 20:26 UTC by Sean Smith
Modified: 2006-08-30 21:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to udev.rules in udev-087.tar.bz2 (udev.rules.patch,759 bytes, patch)
2006-07-24 20:30 UTC, Sean Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Smith 2006-07-24 20:26:30 UTC
I am running 2006.0 and have sys-fs/udev-087-r1 installed.

My problem is that once I've compiled all the necessary modules into the kernel for PalmOS, the device will still not sync with anything.  Specifically, the /dev/pilot device never gets created.  The /dev/pilot device is the device that almost all PalmOS synchronization applications use for communication with the unit.

I've adjusted the /etc/udev/rules.d/50-udev.rules file to appropriately handle this situation.  I'm afraid that my patch (attached) might break the line...

KERNEL=="ttyUSB[0-9]*", NAME="%k", SYMLINK="tts/USB%n", GROUP="tty", MODE="0660"

... which is later in the rules file.


# emerge --info
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r13 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/vmware /usr/portage/local/layman/zugaina"
SYNC="rsync://rsync.localnet/gentoo-portage"
USE="amd64 X aac acpi alsa arts avi berkdb bitmap-fonts cdr cli crypt cups dlloader dri dvd dvdread eds emboss encode flac foomaticdb fortran gif gpm gstreamer gtk gtk2 hal imlib ipv6 isdnlog java jpeg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl nsplugin ogg opengl pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts usb v4l v4l2 xinerama xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sean Smith 2006-07-24 20:30:56 UTC
Created attachment 92677 [details, diff]
Patch to udev.rules in udev-087.tar.bz2

This patch is to be applied to the udev-087.tar.bz2.  It moves the PalmOS lines above the #tty devices line as it is required to utilize the odd numbered ttyUSB devices.
Comment 2 Sean Smith 2006-07-24 20:41:50 UTC
When I ran udevinfo against the sysfs device my Treo 650 created, this was the output:
  looking at device '/class/tty/ttyUSB1':
    KERNEL=="ttyUSB1"
    SUBSYSTEM=="tty"
    SYSFS{dev}=="188:1"

  looking at device '/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1.4/3-1.4:1.0/ttyUSB1':
    ID=="ttyUSB1"
    BUS=="usb-serial"
    DRIVER=="visor"

  looking at device '/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1.4/3-1.4:1.0':
    ID=="3-1.4:1.0"
    BUS=="usb"
    DRIVER=="visor"
    SYSFS{modalias}=="usb:v0830p0061d0100dc00dsc00dp00icFFisc00ip00"
    SYSFS{bInterfaceProtocol}=="00"
    SYSFS{bInterfaceSubClass}=="00"
    SYSFS{bInterfaceClass}=="ff"
    SYSFS{bNumEndpoints}=="04"
    SYSFS{bAlternateSetting}==" 0"
    SYSFS{bInterfaceNumber}=="00"

  looking at device '/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1.4':
    ID=="3-1.4"
    BUS=="usb"
    DRIVER=="usb"
    SYSFS{configuration}==""
    SYSFS{serial}=="PalmSN12345678"
    SYSFS{product}=="Palm Handheld"
    SYSFS{manufacturer}=="PalmOne_ Inc."
    SYSFS{maxchild}=="0"
    SYSFS{version}==" 1.00"
    SYSFS{devnum}=="14"
    SYSFS{speed}=="12"
    SYSFS{bMaxPacketSize0}=="16"
    SYSFS{bNumConfigurations}=="1"
    SYSFS{bDeviceProtocol}=="00"
    SYSFS{bDeviceSubClass}=="00"
    SYSFS{bDeviceClass}=="00"
    SYSFS{bcdDevice}=="0100"
    SYSFS{idProduct}=="0061"
    SYSFS{idVendor}=="0830"
    SYSFS{bMaxPower}=="  2mA"
    SYSFS{bmAttributes}=="c0"
    SYSFS{bConfigurationValue}=="1"
    SYSFS{bNumInterfaces}==" 1"

This showed me that the old line 'KERNEL=="pilot",        NAME="%k", GROUP="uucp"' would not match properly because KERNEL evaluates out to ttyUSB*.  This is why I matched it against 'DRIVER=="visor"' because the driver's not used for anything else.  This also should make it generic for any PalmOS based USB organizer.

Also, when the Palm connects to the system, two ttyUSB devices always get created.  We need to pick the odd numbered device because that's the one it synchronizes against.  

Finally, users who choose to use the pilot will need to be a member of "plugdev."
Comment 3 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-08-30 21:20:37 UTC
Sorry, but I can't add this to the generic rules, it breaks other machines
with people who have usb - serial devices.

My suggestion is just to use a custom rule for your system, as you know
what type of device you have, it will work for you.

Oh, and it's impossible to create a "generic" rule for all palm devices, sorry.
Blame palm for that...