Ask / Submit

Revision history [back]

click to hide/show revision 1
initial version

posted 2014-01-21 15:17:46 +0300

It is not a perfect solution, but it might bring your phone PBAP support. In theory it should work, but I could not test it, because my carkit only talks IrMC and the current obexd library in jolla would need this patch to work (I committed it upstream): IrMC patch in bluez

mkdir -p ~/phonebook/telecom/pb
cd ~/phonebook/telecom/pb
su - nemo; invoker --type=generic vcardconverter -e phonebook.all
gawk ' /BEGIN:VCARD/ { ++a; fn=sprintf("card_%02d.vcf", a); print "Writing: ", fn } { print $0 >> fn; } ' phonebook.all
su mv /etc/obexd/noplugins/pbap /etc/obexd
su reboot

You need not reboot your phone it is enough to restart obexd service. This code exports the phonebook as vcards and splits it in single files in a directory ~/phonebook/telecom/pb. The 4. line moves a file pbap from the obexd noplugins configuration directory, which will enable (not disable) the PBAP plugin on next obexd start.

This works because the dummy obexd PBAP implementation reads the phonebook as single vcard files from the directories under ~/phonebook and delivers it to the requestor. Maybe you have to play a bit with the directory naming based on what your carkit is requesting.

Update: This solution does not work anymore, since 1.0.5.16. But the good news are that the obexd library already has the missing pieces for the correct solution. Only the contact dbus service is missing. So there is progress.

It is not a perfect solution, but it might bring your phone PBAP support. In theory it should work, but I could not test it, because my carkit only talks IrMC and the current obexd library in jolla would need this patch to work (I committed it upstream): IrMC patch in bluez

mkdir -p ~/phonebook/telecom/pb
cd ~/phonebook/telecom/pb
su - nemo; invoker --type=generic vcardconverter -e phonebook.all
gawk ' /BEGIN:VCARD/ { ++a; fn=sprintf("card_%02d.vcf", a); print "Writing: ", fn } { print $0 >> fn; } ' phonebook.all
su mv /etc/obexd/noplugins/pbap /etc/obexd
su reboot

You need not reboot your phone it is enough to restart obexd service. This code exports the phonebook as vcards and splits it in single files in a directory ~/phonebook/telecom/pb. The 4. line moves a file pbap from the obexd noplugins configuration directory, which will enable (not disable) the PBAP plugin on next obexd start.

This works because the dummy obexd PBAP implementation reads the phonebook as single vcard files from the directories under ~/phonebook and delivers it to the requestor. Maybe you have to play a bit with the directory naming based on what your carkit is requesting.