Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92667 - Add auto-connection udev scripts to app-pda/synce
Summary: Add auto-connection udev scripts to app-pda/synce
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo PDA project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: udev-meta
  Show dependency tree
 
Reported: 2005-05-14 22:47 UTC by Yaron Tausky
Modified: 2009-08-05 12:26 UTC (History)
6 users (show)

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


Attachments
iPAQ conncetion script (synce.dev,291 bytes, text/plain)
2005-05-14 22:49 UTC, Yaron Tausky
Details
UDEV rules (60-ipaq.rules,128 bytes, text/plain)
2006-06-11 11:37 UTC, Aaron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaron Tausky 2005-05-14 22:47:00 UTC
I suggest that the app-pda/synce package will include a udev rule and script that automatically connect a Pocket PC PDA once it's plugged.
This has already been suggested in bug #73951, but was resolved INVALID because the solution was implemented as a hotplug usermap.

The udev rule is:
DRIVER="ipaq", NAME="ipaq", SYMLINK="tts/USB%n", GROUP="tty", MODE="0600"

I will attach the script (/etc/dev.d/ipaq/synce.dev) in a moment.
Comment 1 Yaron Tausky 2005-05-14 22:49:18 UTC
Created attachment 58935 [details]
iPAQ conncetion script

This is the connection script, should reside in /etc/dev.d/ipaq/synce.dev.
Comment 2 Chris Hoffmann 2005-07-27 13:18:13 UTC
I had to add /sbin before modprobe in synce-serial-start to make it work
Comment 3 LuisMi Garcia 2005-08-25 15:46:52 UTC
Is anyone giving a look at this? 
 
If it needs to be tested, please report and will test. If now, what's the 
problem? 
 
Thanks and cheers. 
Comment 4 Steven Elling 2005-09-24 06:19:42 UTC
My system emerged udev-068-r1 during a 'emerge -Dub world'.  Now my ipaq will no
longer connect when plugged in to the usb cable.

Also, my system seems to be schizophrenic now.  The other day (~3 days ago) my
system was creating /dev/ttyUSB0 every once in a while and it would sometimes
remove /dev/ttyUSB0 even if it did not create it.  But, my system would never
load the ipaq module and never run synce-serial-start.  I had to load the module
and run synce-serial-start manually.

Now today, my system created /dev/tts/USB0 and /dev/ipaq ONCE.  When I pulled
the ipaq out of the cradle /dev/tts/USB0 and /dev/ipaq were removed but when I
put the ipaq back in... nothing.  /dev/tts/USB0 and /dev/ipaq were not created,
and synce-serial-start never ran.  Nothing was changed on my system between the
time I pulled the ipaq from the cradle and put it back in.

I've tried disconnecting the ipaq, unloading the usbserial and ipaq modules then
reconnecting the ipaq but the modules don't load, the devices are not created
and synce-serial-start does not run.

I've tried leaving the ipaq connected and unloading then reloading the usbserial
and ipaq modules but the devices are not created and synce-serial-start does not
run.

I've tried just disconnecting then reconnecting my ipaq but the devices are not
created and synce-serial-start does not run.

On my system, /etc/udev/rules.d/10-local.rules contains the udev rule for the
ipaq and I have the /etc/dev.d/ipaq/synce.dev connection script.  My copy of
synce-serial-start had a bare modprobe in it and I modified it to list the
absolute path to modprobe but naturally with udev being schizophrenic and
probably brain dead I didn't expect it to work.

WHAT THE HELL IS GOING ON!  I left my ipaq connected while writing this and
/dev/ipaq did not exist.  I tried to copy a backup of the ttyUSB0 device file to
/dev/ipaq just now and cp reported "cannot stat `ipaq': Too many levels of
symbolic links".  /dev/ipaq now exists on my system but is a symbolic link to
itself. WTF!

I removed the ipaq symbolic link and copied the ttyUSB0 device file to /dev/ipaq
and ran synce-serial-start.  My ipaq successfully connected so I know it is not
an synce, module or pppd problem.

Here is the output from 'genlop udev':

 * sys-fs/udev

     Thu Jul 15 11:23:19 2004 >>> sys-fs/udev-025-r1
     Fri Sep 10 09:54:52 2004 >>> sys-fs/udev-030
     Thu Nov 11 12:58:02 2004 >>> sys-fs/udev-043
     Wed Nov 24 10:45:08 2004 >>> sys-fs/udev-045
     Thu Jun  9 00:54:10 2005 >>> sys-fs/udev-056
     Wed Jul 20 18:24:42 2005 >>> sys-fs/udev-058
     Fri Sep 16 00:27:16 2005 >>> sys-fs/udev-068-r1
-----

And 'emerge info':

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Unknown CPU Type
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -m3dnow -mmmx -msse -O2 -fomit-frame-pointer -Wl,-z,now"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/X11/*/app-defaults /etc/X11/app-defaults /etc/X11/gdm
/etc/X11/rstart/rstartd.real /etc/X11/serverconfig /etc/X11/starthere
/etc/X11/sysconfig /etc/X11/xdm /etc/X11/xdm/chooser /etc/X11/xorg.conf.example
/etc/gconf /etc/gnome-vfs-2.0/modules /etc/hotplug /etc/init.d
/etc/openldap/schema /etc/sound/event /etc/splash /etc/terminfo
/usr/X11R6/lib/X11/xkb /usr/lib/X11 /etc/env.d"
CXXFLAGS="-march=athlon-xp -m3dnow -mmmx -msse -O2 -fomit-frame-pointer -Wl,-z,now"
DISTDIR="/usr/local/share/data/pub/linux/gentoo/distfiles"
FEATURES="autoconfig buildpkg ccache distcc distlocks sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/cache/portage-cpan
/usr/local/share/data/pub/linux/gentoo/portage
/usr/local/share/data/pub/linux/gentoo/portage-bmg"
SYNC="rsync://sv01.elling.local/gentoo-portage"
USE="x86 3dnow 3dnowext X Xaw3d acl alsa apm arts audiofile avi berkdb
bitmap-fonts bluetooth bonobo browserplugin cddb cdparanoia cdr crypt cups curl
dbus dga divx4linux dv dvd dvdr dvdread eds emboss encode esd evms2 evo fam flac
foomaticdb gd gdbm gif gnome gnome2 gpm gstreamer gtk gtk2 gtkhtml guile hal
ieee1394 imagemagick imlib ipv6 irmc java jpeg kde kdeenablefinal ldap libg++
libwww live mad mmx mmx2 mmxext motif mozilla mp3 mpeg mysql nas ncurses network
nvidia offensive ofx ogg oggvorbis opengl pam pdflib perl png python qt
quicktime quotes rdesktop readline samba scanner sdl slp spell sse ssl svga
tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales v4l
v4l2 visualization vorbis xine xml xml2 xmms xscreensaver xv xvid xvmc zlib
linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
-----
Comment 5 Simon Ruggier 2006-04-24 02:30:15 UTC
(In reply to comment #0)
> I suggest that the app-pda/synce package will include a udev rule and script
> that automatically connect a Pocket PC PDA once it's plugged.
> This has already been suggested in bug #73951, but was resolved INVALID because
> the solution was implemented as a hotplug usermap.
> 
> The udev rule is:
> DRIVER="ipaq", NAME="ipaq", SYMLINK="tts/USB%n", GROUP="tty", MODE="0600"
> 
> I will attach the script (/etc/dev.d/ipaq/synce.dev) in a moment.
> 

shouldn't it be DRIVER=="ipaq" instead of just one =?
Comment 6 Aaron 2006-06-11 11:37:58 UTC
Created attachment 88931 [details]
UDEV rules

I would like to suggest that this udev rule file is added instead.

It works perfectly for me, and using the KDE applet, automatically mounts my ipaq.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-02-23 09:44:19 UTC
(In reply to comment #6)
> Created an attachment (id=88931) [edit]
> UDEV rules

Uhm, this matches any ttyUSB* device. You should add something like DRIVERS!="ipaq" there or whatever, not really sure what exactly as I don't have any such device.
Comment 8 Iain Buchanan 2008-11-15 08:21:15 UTC
can this be closed in favour of synce-hal?
Comment 9 Iain Buchanan 2009-08-05 12:09:39 UTC
mescalinum: I think this can be closed because of synce-hal :)
Comment 10 Federico Ferri (RETIRED) gentoo-dev 2009-08-05 12:26:48 UTC
is this still a issue?
it's not even clear which version of synce this is referring to.

probably better to open a new bug with current buildlogs, if you ever feel the need ;)