×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    SyncML over HTTP (which sould I send headers?)

    Hello,
    I am trying to write a SyncML server for NOKIA 6230. But I got a basic problem I am not able to send SyncML message to device. Very strange is behaviour of NOKIA device. It initializes synchronisation. Server get its first message and tries answer. But after that NOKIA restarts and not even write "SYNCHRONISATION FAULT".

    I suppose there is a problem in HTTP headers but I am not sure.

    headers from client:

    Accept: application/vnd.syncml+wbxml
    Accept-Charset: UTF-8
    Accept-Encoding: gzip, deflate
    Cache-Control: no-store=0
    Connection: Keep-Alive
    Content-Length: 1212
    Content-Type: application/vnd.syncml+wbxml; charset=UTF-8
    Cookie2: $Version="1"
    Host: www.comstar2000.cz
    User-Agent: Nokia6230/2.0 (05.26) Profile/MIDP-2.0 Configuration/CLDC-1.1
    x-wap-profile: "http://nds1.nds.nokia.com/uaprof/N6230r400.xml"

    headers from server:

    Date: Fri, 07 Jul 2006 09:44:28 GMT
    Server: Apache
    Cache-Control: no-store=0
    Content-Length: 250
    Connection: Close
    Content-Type: application/vnd.syncml+wbxml; charset=UTF-8

    Can you see any basic problem in headers which I dont (it is my first SyncML application)? or should I rather seek problem in WBXML content of the message?

    Thanks. PETR

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    Well, it could be anything. I recommend to use the Nokia Series 40 Prototype SDK in version 1.1 as it includes a SyncML client as a real Nokia 6230 and allows to monitor the network traffic.

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    Thanks, this tool is very useful but I cant find in menu command synchronize? It is not implemented or maybe I am blind I tested HTTP communication and I found that HTTP headers are probably OK. The problem must be in WBXML content. I use libwbxml 0.9.0 and the result is probably false. I have test my WBXML on http://syncml.thover.com and it also indicated me that WBXML is false.

    Can you, everybody, tell me your experience with libwbxml 0.9.0 or recommand me another WBXML coder/decoder? Thank you.
    Last edited by petr.proch; 2006-07-11 at 07:42.

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    How can that tool be useful, when you cannit synchronize? Anyway, you have to start the sync and edit the settings the same way as on a real device. There is no special menu item in the Windows menu.

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    OK, this is thing I can discover myself but what about the WBXML coder/decoder? Are there any alternatives to libwbxml?

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    a) Do it yourself. Use a SAX parser and fill the WBXML bytes. Rather easy.
    b) Learn WBXML yourself and contribute to the libwbxml project.
    c) Ask the libwbxml, I am sure you just misuse it.

    I think b) and c) are the best ways. I would start at b) and when you fail, go for c).

  7. #7
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    Thanks, there was a problem in DPI. Some Encoders write 9F 53 as a second and third byte and some write DPI as a string.

    I would like to have still one question to Series 40 Prototype SDK. I have installed this tool but when I want to set Synchronisation I get answer: "Contact service provider for sync settings". Something is missing to my installation? Where could be mistake?

  8. #8
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    ok, another stupid question from me... I am sorry, I have installed bad version of SDK.

    Also WBXML Encoder/Decoder is fine now. I recommand Horde project. It is simple and PHP.

  9. #9
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    Quote Originally Posted by petr.proch
    there was a problem in DPI. Some Encoders write 9F 53 as a second and third byte and some write DPI as a string.
    Nokia should accept both.
    Quote Originally Posted by petr.proch
    when I want to set Synchronisation [in Series 40 Prototype SDK] I get answer: "Contact service provider for sync settings".
    You have to configure it like a normal mobile phone.

  10. #10
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    I have successfully configured and tested Series 40 Prototype SDK but I cant still find the problem. My NOKIA doesnt want to talk to me. It sends me request, I send response and then only ERROR: Synchronisation failed.

    I suppose that there can be two problems:

    1) bad HTTP headers
    2) bad WBXML code
    3) Do you have any idea about another possible problem?


    Please look on http://syncml.wz.cz/sync.JPG there are diagnostics of our communication.

    I have focused on both possibilities (bad headers, bad WBXML) and I didnt find the problem. Could you help me at least determine the area of the problem? Thanks
    Last edited by petr.proch; 2006-07-17 at 09:39.

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    Still wondering why you do not use a off-the-shelf SyncML server. Waste of time.

    I guess the problem is your SyncML code, actually. Could you please post the WBXML content as hex here, so I can run some tests? The JPEG is afr too large, your server too slow – why is this no GIF anyway? By the way, your content header is a bit wrong. It is either ISO-8859-1 or UTF-8. Leave away that charset completely.

  12. #12
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    Why not off-the-shelf SyncML server? Because I would lose topic of my bachelory work. Other reason is that I need SyncML written in PHP. Only solution I know is The Horde.

    I have tested two WBXML contents (first encoded by WBXML and second encoded by Horde encoder). Here are the files:

    1) SyncML response
    2) WBXML by libwbxml
    3) WBXML by Horde

    I am grateful for your testing. Thanks.
    Last edited by petr.proch; 2006-07-18 at 10:24.

  13. #13
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105
    Your SyncML is wrong. I recommend to use a XML validator. On my webpage there is a XML DOCType header allowing to parse and validate OMA SyncML DS 1.1.2 files.
    Code:
    <!DOCTYPE SyncML PUBLIC
    	'-//SYNCML//DTD SYNCML 1.1//EN'
    	'http://www.openmobilealliance.org/tech/DTD/OMA-SyncML-RepPro-DTD-V1_1_2-20030505-D.dtd'
    	[
    		<!ENTITY % Meta.dtd PUBLIC
    			'-//SYNCML//DTD METINF 1.1//EN'
      			'http://www.openmobilealliance.org/tech/DTD/OMA-SyncML-MetaInfo-DTD-V1_1_2-20030505-D.dtd'
      		>
      		%Meta.dtd;
    		<!ELEMENT Meta (Format?, Type?, Mark?, Size?, Anchor?, Version?, NextNonce?, MaxMsgSize?, MaxObjSize?, EMI*, Mem?)>
    		
    		<!ENTITY % DevInf.dtd PUBLIC
    			'-//SyncML//DTD DevInf 1.1//EN'
    			'http://www.openmobilealliance.org/DTD/OMA-SyncML-DevInfo-DTD-V1_1_2.dtd'
    		>
    		%DevInf.dtd;
    		<!ELEMENT Data (#PCDATA | DevInf)*>
      	]
    >
    Have a look at your CmdID usage.

    Additionally, you are right, libwbxml is doing something wrong related to the string table refs. Make sure you have the latest stable version. When you have that, send your WBXML in a bug report.

  14. #14
    Registered User
    Join Date
    Jul 2006
    Posts
    8

    Re: SyncML over HTTP (which sould I send headers?)

    Wonderful, now I can speek WBXML with my NOKIA!!! Thank you very much for your precise diagnosis. I hope I finish my work without any other problems.

Similar Threads

  1. Problems with HTTP POST
    By Summerman in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-11-27, 09:25
  2. how to send wbxml data into http response object
    By JOhnWire in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2006-04-11, 14:17
  3. Using Bluetooth to send data to a nokia 6310 and then sending it over http
    By studentproject in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-11-01, 08:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •