[sync] syncing with SE W800i

Karsten Fourmont fourmont at gmx.de
Tue Oct 3 12:17:51 PDT 2006


Anders Tietze wrote:
> If I look in to the logfiles I can see that the last received vcard
> isn't complete and the phone reports a <MoreData/> tag

Sigh. Whenever I think I completely implemented the protocol, just
another thing comes up...

The <MoreData> tag is not supported yet.

> It seems like server has to answer 214 instead of 215.
This, and implementing the moredata logic ;-) I'll see what I can do.

Cheers,
  Karsten


Anders Tietze wrote:
> Hi Karsten,
> 
> The fix is working. Thanks!
> 
> But I am afraid that I have found another problem.
> 
> When the phone has synchronized about 28 contacts it reports an error. 
> If I look in to the logfiles I can see that the last received vcard 
> isn't complete and the phone reports a <MoreData/> tag
> 
>             <Replace>
>                 <CmdID>78</CmdID>
>                 <Item>
>                     <Source>
>                         <LocURI>90</LocURI>
>                     </Source>
>                     <Meta>
>                         <Type xmlns="syncml:metinf">text/x-vcard</Type>
>                         <Size xmlns="syncml:metinf">170</Size>
>                     </Meta>
>                     <Data><![CDATA[BEGIN:VCARD
> VERSION:2.1
> N;CHARSET=UTF-8:TTTT;TTTT
> TEL;HOME:+45
> EMAIL;INTERNET;PREF;CHARSET=UTF-8:martins]]></Data>
>                     <MoreData/>
>                 </Item>
>             </Replace>
>         </Sync>
>     </SyncBody>
> </SyncML>
> 
> The server gives the following answer to that:
> 
>        <Status>
>             <CmdID>35</CmdID>
>             <MsgRef>5</MsgRef>
>             <CmdRef>78</CmdRef>
>             <Cmd>Replace</Cmd>
>             <SourceRef>90</SourceRef>
>             <Data>215</Data>
>         </Status>
>         <Final/>
>     </SyncBody>
> </SyncML>
> 
> I have been doing some searching on the net and I found this:
> 
> [From section 3.1.2 in 
> http://www.openmobilealliance.org/tech/affiliates/syncml/changes_for_syncml_protocol_v11_20020215.pdf#search=%22syncml%20%3CMoreData%2F%3E%22 
> ]
> "On receipt of a data object with the <MoreData/> element, the recipient 
> MUST respond with a status response “214 – Chunked item accepted and 
> buffered” and, if there are no other commands to be sent, ask for the 
> next message using the Alert 222 mechanism defined in section 2.9."
> 
> It seems like server has to answer 214 instead of 215.
> 
> Best regards,
> Anders
> 
> Karsten Fourmont wrote:
>> Hi Anders,
>>
>> the current default turba (address book) database structure is not 
>> very suitable for SyncML: only one name field instead of seperate 
>> first name and last name, address in one multiline field instead of 
>> split into street city and so on.
>>
>> The attached sql script provides a better structure.
>> Run the sql script to create the table. You need to have to 
>> rename/delete/backup your orginal turba_objects table first.
>>
>> You also have to use the attached sources.php (in the conf directory) 
>> or paste it into your existing sources.php if you want to use multiple 
>> sources.
>>
>> Can you give it a try and report if this is working better?
>>
>>
>> Cheers,
>>  Karsten
>>
>>
>>
>> Anders Tietze wrote:
>>> Ok thanks. I have added the example now.
>>>
>>> Cheers,
>>> Anders
>>>
>>> Karsten Fourmont wrote:
>>>> Hi,
>>>>
>>>> you need to "unlock" the page first. I did this right now.
>>>>
>>>> Then the "editpage" link appears. Just copy the syntax from one of 
>>>> the other examples.
>>>>
>>>> Cheers,
>>>>  Karsten
>>
>>
>> ------------------------------------------------------------------------
>>
>> array('fields' => array('firstname', 'lastname'), * 'format' => '%s 
>> %s'), * 'firstname' => 'object_firstname', * 'lastname' => 
>> 'object_lastname', * ... * * tabs: All fields can be grouped into tabs 
>> with this optional entry. * This list is multidimensional hash, the 
>> keys are the tab * titles. * Here is an example: * 'tabs' => array( * 
>> 'Names' => array('firstname', 'lastname', 'alias'), * 'Addresses' => 
>> array('homeAddress', 'workAddress') * ); * * search: A list of Turba 
>> attribute names that can be searched for this * source. * * strict: A 
>> list of native field/attribute names that must always be * matched 
>> exactly in a search. * * export: If set to true, this source will 
>> appear on the Export menu, * allowing users to export the contacts to 
>> a CSV (etc.) file. * * browse: If set to true, this source will be 
>> browseable via the Browse * menu item, and empty searches against the 
>> source will return * all contacts. * * use_shares: If this is present 
>> and true, Horde_Share functionality will * be enabled for this source 
>> - allowing users to share their * personal addressbooks as well as to 
>> create new ones. Since * Turba only supports having one backend 
>> configured for * creating new shares, use the 'shares' configuration 
>> option to * specify which backend will be used for creating new 
>> shares. * All permission checking will be done against Horde_Share, 
>> but * note that any 'extended' permissions (such as max_contacts) * 
>> will still be enforced. Also note that the backend driver * must have 
>> support for using this. Currently SQL only. * * Here are some example 
>> configurations: */ /** * A local address book in an SQL database. This 
>> implements a private * per-user address book. Sharing of this source 
>> with other users may be * accomplished by enabling Horde_Share for 
>> this source by setting * 'use_shares' => true. * * Be sure to create a 
>> turba_objects table in your Horde database from the * schema in 
>> turba/scripts/db/turba.sql if you use this source. */ 
>> $cfgSources['localsql'] = array( 'title' => _("My Addressbook"), 
>> 'type' => 'sql', // The default connection details are pulled from the 
>> Horde-wide SQL // connection configuration. // // The old example 
>> illustrates how to use an alternate database // configuration. // // 
>> New Example: 'params' => array_merge($GLOBALS['conf']['sql'], 
>> array('table' => 'turba_objects')), 'map' => array( '__key' => 
>> 'object_id', '__owner' => 'owner_id', '__type' => 'object_type', 
>> '__members' => 'object_members', '__uid' => 'object_uid', 'name' => 
>> array('fields' => array('firstname', 'lastname'), 'format' => '%s 
>> %s'), 'firstname' => 'object_firstname', 'lastname' => 
>> 'object_lastname', 'name_prefix' => 'object_nameprefix', 'email' => 
>> 'object_email', 'alias' => 'object_alias', 'homeStreet' => 
>> 'object_homestreet', 'homeCity' => 'object_homecity', 'homeProvince' 
>> => 'object_homeprovince', 'homePostalCode' => 'object_homepostalcode', 
>> 'homeCountry' => 'object_homecountry', 'workStreet' => 
>> 'object_workstreet', 'workCity' => 'object_workcity', 'workProvince' 
>> => 'object_workprovince', 'workPostalCode' => 'object_workpostalcode', 
>> 'workCountry' => 'object_workcountry', 'homePhone' => 
>> 'object_homephone', 'workPhone' => 'object_workphone', 'cellPhone' => 
>> 'object_cellphone', 'fax' => 'object_fax', 'pager' => 'object_pager', 
>> 'title' => 'object_title', 'company' => 'object_company', 'website' => 
>> 'object_url', 'notes' => 'object_notes', 'pgpPublicKey' => 
>> 'object_pgppublickey', 'smimePublicKey' => 'object_smimepublickey', 
>> 'freebusyUrl' => 'object_freebusyurl' ), 'search' => array( 'name', 
>> 'email' ), 'strict' => array( 'object_id', 'owner_id', 'object_type', 
>> ), 'export' => true, 'browse' => true, 'use_shares' => true, );
>>
>>
>> ------------------------------------------------------------------------
>>
>> -- $Horde: turba/scripts/sql/turba_objects_syncml.mysql.sql,v 1.4 
>> 2006/03/20 18:25:00 selsky Exp $
>> -- turba_objects more suitable for SyncML replication.
>> -- 
>> -- You can simply execute this file in your database.
>> -- 
>> -- Run as:
>> -- 
>> -- $ mysql --user=root --password=<MySQL-root-password> <db name> < 
>> turba_objects.mysql.sql
>> CREATE TABLE `turba_objects` (
>>   `object_id` varchar(32) NOT NULL,
>>   `owner_id` varchar(255) NOT NULL,
>>   `object_type` varchar(255) NOT NULL default 'Object',
>>   `object_uid` varchar(255),
>>   `object_members` blob,
>>   `object_lastname` varchar(255) NOT NULL default '',
>>   `object_firstname` varchar(255),
>>   `object_alias` varchar(32),
>>   `object_nameprefix` varchar(255),
>>   `object_email` varchar(255),
>>   `object_homestreet` varchar(255),
>>   `object_homecity` varchar(255),
>>   `object_homeprovince` varchar(255),
>>   `object_homepostalcode` varchar(255),
>>   `object_homecountry` varchar(255),
>>   `object_workstreet` varchar(255),
>>   `object_workcity` varchar(255),
>>   `object_workprovince` varchar(255),
>>   `object_workpostalcode` varchar(255),
>>   `object_workcountry` varchar(255),
>>   `object_homephone` varchar(25),
>>   `object_workphone` varchar(25),
>>   `object_cellphone` varchar(25),
>>   `object_fax` varchar(25),
>>   `object_pager` varchar(25),
>>   `object_title` varchar(255),
>>   `object_company` varchar(255),
>>   `object_notes` text,
>>   `object_url` varchar(255),
>>   `object_pgppublickey` text,
>>   `object_smimepublickey` text,
>>   `object_freebusyurl` varchar(255),
>>   `object_role` varchar(255),
>>   `object_category` varchar(80),
>>   `object_photo` blob,
>>   `object_blobtype` varchar(10),
>>   `object_bday` bigint(10),
>>         PRIMARY KEY(object_id)
>> );
>>
>> CREATE INDEX turba_owner_idx ON turba_objects (owner_id);
>>
>> GRANT SELECT, INSERT, UPDATE, DELETE ON turba_objects TO horde at localhost;




More information about the sync mailing list