Lovely - both your solutions work. The easier one for me is adding a 
"syncmlvers=2" profile key, so I can directly use the profile in N900's 
Syncevolution UI.

Thanks guys.

-------------------------
Original-Nachricht:
Von: Lukas Zeller <[email protected]>
An: Patrick Ohly <[email protected]>
Cc: [email protected] <[email protected]>, [email protected] 
<[email protected]>
Datum: Montag, März 1 2010 09:41 PM
Betreff: Re: [SyncEvolution] Syncevolution on Nokia N900 : Force SyncML 1.1 ?
Hello,

On Mar 1, 2010, at 21:02 , Patrick Ohly wrote:

>> So is there a way to force Syncevolution to us SyncML 1.1 ?
> 
> Nothing straight-forward. Here's something a bit more complicated which
> might work. If it does, we can think about making it easier.
>      * download
>        
> http://git.moblin.org/cgit.cgi/syncevolution/plain/src/syncclient_sample_config.xml?id=syncevolution-0-9-2
>      * put it onto the N900 in some directory, as normal user, using
>        the name syncclient_sample_config.xml
>      * edit that file and insert
>        <defaultsyncmlversion>1.1</defaultsyncmlversion> somewhere after
>        <client type="plugin"> and before </client>
>      * run the "syncevolution --run --sync-property loglevel=4 'server
>        config name'" command line in the directory where you edited the
>        file
>      * if it doesn't work, check the session log (see "syncevolution
>        --print-sessions") whether the <defaultsyncmlversion> part is in
>        the config logged there
> 
> According to the Synthesis docs for that option, the engine should retry
> with a lower protocol version when the 1.2 default doesn't work. I'm not
> sure how that is meant to work exactly, because the "Internal Server
> Error" gives no indication at all about the root cause and thus should
> be treated as fatal error, with no retries. Perhaps it works if the
> server fails more gracefully.

Yes - Every SyncML server (all versions) should respond with status 513 when it 
can't handle the SyncML version of a message sent by a client. libsynthesis 
also checks for 505,501 and even 400 status code in addition to 513, and 
performs a retry with the next lower SyncML version if any of these are 
returned in a SyncHdr Status. Unfortunately, some servers just break the 
connection or return 500 HTTP level errors.

But note that libsynthesis provides another way for clients to set the default 
SyncML version to be used with a server apart from 
<defaultsyncmlversion>1.1</defaultsyncmlversion>: In the settings profile, 
there is a key called "syncmlvers" which stores the SyncML version that should 
be used for the next sync (0=unknown, 1=1.0, 2=1.1, 3=1.2). This is initialized 
with 0 for a new profile, and automatically updated by libsynthesis after a 
successful message exchange with the server (such that the client will use the 
correct SyncML version for subsequent syncs without the need for retries).

This "syncmlvers" profile key could be exposed in the settings, or otherwise 
influenced by the application (SyncEvolution). In the synthesis PDA clients, 
this is exposed in the settings UI to allow forcing lower SyncML versions for 
servers that don't properly implement the 513 version check/fallback mechanism.
Another option is to decrement the SyncML version using "syncmlvers" 
automatically when detecting a server responding with errors on the HTTP or 
transport level - with the disadvantage that a real network problem while 
trying to connect to a DS 1.2 capable server can lead to the client using only 
an inferior (1.1 or 1.0) SyncML version with that server. So IMHO a UI setting 
is safer.

Best Regards,

Lukas Zeller ([email protected])
- 
Synthesis AG, SyncML Solutions  & Sustainable Software Concepts
[email protected], http://www.synthesis.ch
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to