Menu

#47 kaddressbook plugin and irmc with kde 3.4 - vcard 3.0

open
nobody
None
5
2015-01-05
2005-10-22
Anonymous
No

My KDE Adressbook stores its Data with vcard 3.0 and the code
in kaddrbook.cpp, main part of the KDE Adressbook plugin
KABC::VCardConverter converter;
QString card = converter.createVCard(*it);
creates a vcard 3.0.

My mobile Siemens CX75 can only store 2.1, thats why
syncing an entry from the KDE-Adressbook to the mobile fails:

Here a part of the output from IRDA-Dump:
23:54:55.620465 i:cmd > ca=c0 pf=1 nr=7 ns=0 LM slsap=55
dlsap=04 TTP credits=1
OBEX PUT final=1 len=509 Lenght=425 Name="telecom/pb/luid/
2684682368.vcf" custom=[5 bytes] body-end=[425 bytes] (514)
23:54:55.674361 rr:rsp < ca=c0 pf=1 nr=1 (2)
23:54:55.775324 rr:cmd > ca=c0 pf=1 nr=7 (2)
23:54:55.785320 i:rsp < ca=c0 pf=1 nr=1 ns=7 LM slsap=04
dlsap=55 TTP credits=1
OBEX Unknown response 46 (8)
23:54:55.797961 i:cmd > ca=c0 pf=1 nr=0 ns=1 LM slsap=55
dlsap=04 TTP credits=1
OBEX PUT final=1 len=489 Lenght=425 Name="telecom/pb/luid/.
vcf" custom=[5 bytes] body-end=[425 bytes] (494)
23:54:55.850332 rr:rsp < ca=c0 pf=1 nr=2 (2)
23:54:55.951293 rr:cmd > ca=c0 pf=1 nr=0 (2)
23:54:55.961290 i:rsp < ca=c0 pf=1 nr=2 ns=0 LM slsap=04
dlsap=55 TTP credits=1
OBEX Unknown response 46 (8)

Here the debug-output from multisync at the same time:

Got message 6
Loaded change counter 0
Loaded change counter 210
Change log:
SN: 356427001854566
DID:8230164
Total-Records:98
Maximum-Records:1000

Phonebook changecounter: 210
New DBs: 0
kdepim_plugin: get_changes(conn,newdbs=0)
kdepim_plugin: KDE addressbook reloaded OK.
kdepim_plugin: KDE addressbook locked OK.
kdepim_plugin: MODIFIED UID=LVApo6f738 (Prename Name)
BEGIN:VCARD
ADR;TYPE=work:;;;XXXXX;;;
BDAY:1982-04-27T00:00:00Z
CLASS:PUBLIC
EMAIL:xxx@xxx.de
FN:Prename Name
N:Name;Prename;;;
ORG:xxx
REV:2005-10-22T23:54:48Z
TEL;TYPE=HOME:+491234
TEL;TYPE=WORK:+495678
TEL;TYPE=CELL:01701123
UID:LVApo6f738
VERSION:3.0
X-ESI-CATEGORIES:Familie
X-IRMC-LUID:2684682368
END:VCARD

Process: 0 1
Got 1 changes.
Change type: 1, object type: 2
UID:
2684682368
Comp:
BEGIN:VCARD
ADR;TYPE=work:;;;XXXXX;;;
BDAY:1982-04-27T00:00:00Z
CLASS:PUBLIC
EMAIL:xxx@xxx.de
FN:Prename Name
N:Name;Prename;;;
ORG:xxx
REV:2005-10-22T23:54:48Z
TEL;TYPE=HOME:+491234
TEL;TYPE=WORK:+495678
TEL;TYPE=CELL:01701123
UID:LVApo6f738
VERSION:3.0
X-ESI-CATEGORIES:Familie
X-IRMC-LUID:2684682368
END:VCARD

Body: BEGIN:VCARD
ADR;TYPE=work;WORK:;;;XXX;;;
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:=0A=0AXXX =0A
BDAY:1982-04-27T00:00:00Z
CLASS:PUBLIC
EMAIL:xxx@xxx.de
FN:Prename Name
N:Name;Prename;;;
ORG:xxx
REV:2005-10-22T23:54:48Z
TEL;TYPE=HOME:+491234
TEL;TYPE=WORK:+495678
TEL;TYPE=CELL:01701123
UID:LVApo6f738
VERSION:3.0
X-ESI-CATEGORIES:Familie
X-IRMC-LUID:2684682368
END:VCARD

//--i added these outputs for debuging--
irmc_obex_put: STATE NICHT irmc_obex_reqdone!
irmc_pb_modify_or_delete: ERGEBNIS von irmc_obex_put: -1!
irmc_pb_modify_or_delete: Ergebnis von irmc_obex_put ungleich 0,
FERTIG!
--//
Body: BEGIN:VCARD
ADR;TYPE=work;WORK:;;;XXX;;;
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:=0A=0AXXX, =0A
BDAY:1982-04-27T00:00:00Z
CLASS:PUBLIC
EMAIL:xxx@xxx.de
FN:Prename Name
N:Name;Prename;;;
ORG:xxx
REV:2005-10-22T23:54:48Z
TEL;TYPE=HOME:+491234
TEL;TYPE=WORK:+495678
TEL;TYPE=CELL:01701123
UID:LVApo6f738
VERSION:3.0
X-ESI-CATEGORIES:Familie
X-IRMC-LUID:2684682368
END:VCARD

//--i added these outputs for debuging--
irmc_obex_put: STATE NICHT irmc_obex_reqdone!
irmc_pb_modify_or_delete: ERGEBNIS von irmc_obex_put: -1!
irmc_pb_modify_or_delete: Ergebnis von irmc_obex_put ungleich 0,
FERTIG!
--//
Got 0 changes.
kdepim_plugin: syncobj_modify_list()
Synchronization success!
kdepim_plugin: sync_done(conn,success=1)
kdepim_plugin: KDE addressbook saved and unlocked.

I changed the "VERSION:3.0" to "VERSION:2.1" for testing in
irmc_sync.c:irmc_pb_modify_or_delete -> everything works fine.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    My resolution was to change the line 260 in kaddrbook.cpp from
    QString card = converter.createVCard(*it);
    to
    QString card = converter.createVCard(*it, KABC::VCardConverter::v2_1);

     
  • Stewart Heitmann

    Logged In: YES
    user_id=389518

    This is due to a fundamental flaw in the multisync design.
    It presumes that the VCARD format is standard across all
    devices when in reality it is not.
    There are other problems with the sync engine design too, it
    erroneously deletes any vcard fields from the first device that
    the second device ignores. Don't expect any fixes soon since
    the problem is inherent in the sync engine, and even the
    opensync replacement seems to suffer the same problem.

    Changing line 260 in kaddrbook.cpp as mentioned by
    "nobody" will work if you know that you are only ever to sync
    your addressbook to a vcard 2.1 device but its not a general
    solution.

     

Log in to post a comment.

MongoDB Logo MongoDB