How SynCE Tools Cooperate

Synce projects consists of several utilities, tools and applications that allow users to access files on device, synchronize contacts and calendar and few other. There is no "synce" program. Several tools have to work together in order to "synce" to work. This list briefly mentions their responsibilities in the orchestra. (The list is very incomplete.)

Source: [http://sourceforge.net/mailarchive/forum.php?thread_name=1197562236.26413.28.camel%40mark01.mpellis.org.uk&forum_name=synce-devel Mark Ellis on synce-devel list], Jonny Lamb's vdccm-0.10.1 release announcement (where?)

Details

odccm - uses dbus for notifying clients (e.g. synce-engine and synce-gnome) about connections and disconnections, GNet for communicating with PDA and gobject to use oobject-oriented programming (there may be better reason). Network communication is non-blocking, D-Bus requests processing too. Authentization: device may require password in order to communicate with computer, client is expected to query user and provide it to odccm. Authentization state machine is in conn_event_cb(), handles transition depending on success and failures from device. When clients calls odccm_device_provide_password() via D-Bus, odccm obfuscates it and sends the password to device (gnet_conn_write) and request asynchronous read of authentication result, then return without returning result to the D-Bus call. When result arrives, gnet calls conn_event_cb() which is registered to process all (asynchronously) received data. It appears that all received data are related to authentization. All password state related transitions seem to be in conn_event_cb(). If authentization was in state CTRL_STATE_AUTH and received data indicate success, it returns success to the D-Bus call which initiated odccm_device_provide_password().

Plugging a device

  1. When Windows Mobile device is plugged to USB, Linux (the kernel) reads device's USB descriptors
  2. Based on these descriptors Linux somehow loads appropriate modules (for WM5: usbnet.ko, cdc_ether.ko, rndis_host.ko)
  3. kernel module rndis_host creates new network interface to the device
  4. NetworkManager is notified about the new interface

  5. synce-odccm or NetworkManager obtains IPv4 address for the interface

  6. synce-odccm daemon broadcasts announcement over D-Bus that new device was attached (device may require password)
  7. synce-gnome or sync-engine receive the event, ask for password and send it over D-Bus to synce-odccm daemon
  8. synce-gnome or sync-engine display bubble announcing new device

SynceArchitecture (last edited 2008-01-23 15:01:58 by Jc2k)