[sync] Syncing with the P1i

Jan Schneider jan at horde.org
Tue Sep 29 22:23:02 UTC 2009


Zitat von Martin Zoller <mailinglists at zollerit.ch>:

> Jan Schneider wrote:
>> And who is wrong, the phone or Horde? Did you take a look at the  
>> logged client messages?
> Looks like the phone is wrong. I've checked a few entries from the
> client messages with a binary editor, and they have exactly the length
> that Horde claims they have (and two bytes less than the phone says). I
> assume you have to count from "BEGIN:VCARD" to "END:VCARD"?

 From the start to the end of the embedding <Data> tag.

>>> The following problems persist:
>>>
>>> - Contact categories are not synced yet. This should be easy to
>>> implement since Turba has basic support for the "category" field.
>>>
>>> - The P1i has a common database for calendar and tasks, even though they
>>> are handled by separate applications on the phone. To backup my data, I
>>> need to sync this DB first with the "calendar", then with the "tasks"
>>> database. Therefore I can only do a one-way backup, since an actual sync
>>> would always destroy half the data on the phone. Maybe Horde could
>>> emulate a "caltask" database and automatically split the data into
>>> appointments and tasks. mobical.net supports this, and it works perfectly.
>> Horde does support it too. And the device driver for your phone  
>> actually has a check for it. Can you post the logged devinf file?
> Oh, now I've found where this is handled. Still, it doesn't seem to work.
> Here is my devinf.txt for a calendar backup (which should include tasks):
>
> SyncML_DeviceInfo::__set_state(array(
>   'VerDTD' => '1.2',
>   'Man' => 'Sony Ericsson',
>   'Mod' => 'P1i',
>   'OEM' => 'SymbianUK',
>   'FwV' => '0',
>   'SwV' => 'Z1.0.1',
>   'HwV' => '1.0',
>   'DevID' => 'IMEI:357033010722247',
>   'DevTyp' => 'smartphone',
>   'DataStores' =>
>  array (
>    0 =>
>    SyncML_DataStore::__set_state(array(
>       'SourceRef' => 'C:Calendar',
>       'DisplayName' => 'Agenda',
>       'MaxGUIDSize' => NULL,
>       'Rx_Pref' =>
>      array (
>        'text/x-vcalendar' => '1.0',
>      ),
>       'Rx' =>
>      array (
>        'text/x-vcalendar' => '1.0',
>      ),
>       'Tx_Pref' =>
>      array (
>        'text/x-vcalendar' => '1.0',
>      ),
>       'Tx' =>
>      array (
>        'text/x-vcalendar' => '1.0',
>      ),
>       'DSMem' => NULL,
>       'SyncCap' =>
>      array (
>        1 => true,
>        2 => true,
>        3 => true,
>        5 => true,
>        6 => true,
>        4 => true,
>        7 => true,
>      ),
>    )),
>  ),
>   'CTCaps' => NULL,
>   'Exts' => NULL,
>   'UTC' => true,
>   'SupportLargeObjs' => true,
>   'SupportNumberOfChanges' => true,
> ))
>
> So 'CTCaps' apparently isn't set, and this is where Horde checks for the
> mixed Calendar/Todo database! If I let the handleTasksInCalendar()
> function in P800.php simply return true, the tasks are processed too. :-)
> Could this CTCaps thing be a bug in Put.php? I'll send Jan a client
> response file to check this.

The SyncML message structure was indeed different from anything that I  
have seen so far. Thus the CTCap information wasn't correctly parsed  
out of the DevInf tag.
Please try if this is fixed with the following patch:
http://cvs.horde.org/diff.php/framework/SyncML/SyncML/Command/Put.php?rt=horde&r1=1.12.10.13&r2=1.12.10.14&ty=u

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the sync mailing list