[missing-sync-palmos-talk] MS 4.0: Problems with WLAN and USB syncing; BT syncing not working at all

Pekka Nikander pekka.nikander at iki.fi
Sat Jul 31 22:51:54 PDT 2004


I hate to reply to myself, but...

> First, there seems to be some glitch in the Missing Sync
> Monitor that sometimes makes it completely unresponsive.

This seems to be related to the TCP problems, see below.

> Secondly, I seem to get non-deterministic results on syncing
> working wrt. the GUI app running.

This was apparently just a coincidence, and nothing to
be taken seriously.   The real problem is in TCP, see
below.

> After that, and after having had my Mac sleeping overnight,
> I was able to perform WLAN hotsync for a number of times
> (three or four), but after that it stopped working again.

It appears that my Clie drops the WLAN connection before the
TCP connection has a chance to do its final handshake.  As
a result, the TCP connection at the Mac end remains in
ESTABLISHED state, for a long time (several minutes).  During
this time Missing Sync Monitor appears just to be sitting
somewhere, perhaps waiting for more data from the PDA, and
it does not sync with any means, not even over USB.

However, if I terminate synching on the PDA end prematurely,
the TCP connection does get closed, or at least the PDA starts
TCP close handshake.  After that, Missing Sync Monitor is
again responsive.

> The TCP connection is created (I can verify this with tcpdump
> and netstat -an) but syncing doesn't start.

My guess is that the Apple library calls the accept system
call on another thread so that the TCP connection is correctly
created, but Missing Sync Monitor is still waiting for data
on the old connection, which the PDA has already abandoned.

To me, it looks like that there are at least a few different
ways to fix this problem:

  - Create a separate thread in Missing Sync Monitor for
    waiting for new synchronisation connections.  That would
    at least respond (and perhaps abandon sync) when the
    real synchronisation thread is still waiting to receive
    more data.

  - In the TCP case, use KEEP_ALIVE with short enough
    period, maybe 10 seconds?

  - Make the default synchronisation timeout much shorter
    than it is now.  This may have adverse effects on modem
    synching, though.

--Pekka Nikander



More information about the missing-sync-palmos-talk mailing list