I am running Fedora Core 2 with a linux version 2.6.5 on my PC box. I
installed the latest synce 0.9 rpm's from sourceforge. I also
successfully applied all the patches as spelled out in the various
notes in this forum.

I successfully connected via USB to a HP iPAQ 5150 using:
synce-serial-config ttyUSB=1 /* superuser mode */
dccm /* user mode */
synce-serial-start /* superuser mode */

I was able to use the tools (pls, pcp, etc) to access files and
directories on the PDA.

After I disconnected the USB cable, I did a:
synce-serial-abort /* superuser mode */

Then I reconnected the USB cable and tried to do a:
synce-serial-start /* superuser mode */
But it does not work anymore.

Has anyone successfully managed to keep synce working even as the USB
cable is repeatedly connected and disconnected? I have a need to get
synce working in such an environment.

Thanks
Dennis

FYI: I do not have hotplug enabled. Below is the dump from
/var/log/messages with my annotations to explain what I did.

Oct 26 14:16:17 dennis dccm[2788]: Listening for connections on port
5679 /* I started dccm */
Oct 26 14:16:26 dennis kernel: usb 3-2: new full speed USB device
using address 2 /* I connected the USB cable */
Oct 26 14:16:26 dennis kernel: usbserial 3-2:1.0: PocketPC PDA
converter detected
Oct 26 14:16:26 dennis kernel: usb 3-2: PocketPC PDA converter now
attached to ttyUSB0 (or usb/tts/0 for devfs)
Oct 26 14:16:26 dennis kernel: usb 3-2: PocketPC PDA converter now
attached to ttyUSB1 (or usb/tts/1 for devfs)
Oct 26 14:16:53 dennis kernel: CSLIP: code copyright 1989 Regents of
the University of California
Oct 26 14:16:53 dennis kernel: PPP generic driver version 2.4.2
Oct 26 14:16:53 dennis kernel: ip_tables: (C) 2000-2002 Netfilter core
team
Oct 26 14:16:53 dennis synce-serial-start: Executing '/usr/sbin/pppd
call synce-device'
Oct 26 14:16:53 dennis pppd[2883]: pppd 2.4.2 started by root, uid 0
Oct 26 14:16:54 dennis pppd[2883]: Serial connection established.
Oct 26 14:16:54 dennis pppd[2883]: Using interface ppp0
Oct 26 14:16:54 dennis pppd[2883]: Connect: ppp0 <--> /dev/ttyUSB1
Oct 26 14:16:55 dennis kernel: PPP Deflate Compression module
registered
Oct 26 14:16:55 dennis pppd[2883]: local IP address 192.168.131.102
Oct 26 14:16:55 dennis pppd[2883]: remote IP address 192.168.131.201
Oct 26 14:16:56 dennis dccm[2788]: Connection from 192.168.131.201
accepted
Oct 26 14:16:56 dennis dccm[2788]: Talking to 'Pocket_PC', a PocketPC
device of type hp iPAQ h5000

/* I disconnect the USB cable here */
Oct 26 14:25:20 dennis kernel: usb 3-2: USB disconnect, address 2
Oct 26 14:25:20 dennis kernel: usbserial 3-2:1.0: device disconnected
Oct 26 14:25:21 dennis kernel: /home/choud/synce/ipaq/ipaq.c:
ipaq_write_bulk - failed submitting write urb, error -19
Oct 26 14:25:31 dennis dccm[2788]: Connection from 192.168.131.201
closed

/* I did a synce-serial-abort here */
Oct 26 14:25:53 dennis synce-serial-abort: Killing process with PID
2883
Oct 26 14:25:53 dennis pppd[2883]: Terminating on signal 15.
Oct 26 14:25:59 dennis pppd[2883]: Connection terminated.
Oct 26 14:25:59 dennis pppd[2883]: Connect time 9.0 minutes.
Oct 26 14:25:59 dennis pppd[2883]: Sent 16360 bytes, received 13421
bytes.

/* Looks like pid 2883 didnt die, so.. */
/* I did another synce-serial-abort here */
Oct 26 14:39:48 dennis synce-serial-abort: Killing process with PID
2883
Oct 26 14:39:48 dennis pppd[2883]: Terminating on signal 15.
Oct 26 14:39:48 dennis pppd[2883]: ioctl(TIOCSETD, N_TTY): Interrupted
system call (line 573)
Oct 26 14:39:48 dennis pppd[2883]: tcsetattr: Invalid argument (line
1000)
Oct 26 14:39:48 dennis kernel: PocketPC PDA ttyUSB0: PocketPC PDA
converter now disconnected from ttyUSB0
Oct 26 14:39:48 dennis kernel: PocketPC PDA ttyUSB1: PocketPC PDA
converter now disconnected from ttyUSB1
Oct 26 14:39:48 dennis pppd[2883]: Hangup (SIGHUP)
Oct 26 14:39:48 dennis pppd[2883]: Connect time 9.0 minutes.
Oct 26 14:39:48 dennis pppd[2883]: Sent 16360 bytes, received 13421
bytes.
Oct 26 14:39:48 dennis pppd[2883]: Exit.

/* Looks like pid 2883 died on the 2nd kill. */
/* So I did a synce-serial-start here */
Oct 26 14:41:23 dennis synce-serial-start: Executing '/usr/sbin/pppd
call synce-device'
Oct 26 14:41:23 dennis pppd[3158]: pppd 2.4.2 started by root, uid 0
Oct 26 14:41:23 dennis pppd[3158]: Failed to open /dev/ttyUSB1: No
such device
Oct 26 14:41:23 dennis pppd[3158]: Exit.

/* It somehow cannot open /dev/ttyUSB1 anymore. */

I am tracing the logs and it appears that when I unplug the USB cable,
the read_bulk_callback or the write_bulk routines will return an error
code of either -2, -84 or -19. Given that it returns an error, should
it then do a serial_close so that we can invoke the tty_hangup? It
appears that it does not do a serial_close but continues to do more
reads and/or writes.

Can anyone tell me who calls the serial_xxx() routines? Any pointers
will be appreaiated.