Hi Patrick,
On 01/27/2012 07:00 PM, Patrick Ohly wrote:
On Fr, 2012-01-27 at 14:55 +0100, Mikel Astiz wrote:
> The LUID is built from the full-name of each contact, assuming that
> the field will often remain constant.
That is a limitation of the data made available by obex-client via
D-Bus, right? If I remember correctly, PBAP has a unique ID for each
item. It's not stable across sessions and thus not particularly useful
for syncing. Probably not worth exposing.
obex-client does actually expose the ID, but as you say, it's not stable
across different sessions, so there's no much to do with it.
As the LUID is not used for anything, how about simply enumerating
all
available contacts? That would be simpler than looking at the FN
property.
How would that be? I thought the sync engine relied on the backend LUID
to be able to merge changes.
When I tried the new backend with my HTC Desire, I only got as far as
a
"Permission denied" from obex-client. The obex-client debug output seems
to imply that it is the phone which rejects the access:
$ /usr/lib/obexd/obex-client -d -s
obex-client[25056]: obex-client daemon 0.42
obex-client[25056]: client/main.c:main() Entering main loop
obex-client[25056]: client/session.c:session_ref() 0x10f8e90: ref=2
obex-client[25056]: client/session.c:manager_reply() adapter
path /org/bluez/1750/hci0
obex-client[25056]: client/session.c:rfcomm_connect()
obex-client[25056]: client/session.c:rfcomm_callback()
obex-client[25056]: Permission denied (13)
obex-client[25056]: client/session.c:session_shutdown() 0x10f8e90
...
PBAB is supported:
$ sdptool search --bdaddr 90:21:55:A2:4E:AD PBAP
Searching for PBAP on 90:21:55:A2:4E:AD ...
Service Name: Phonebook Access PSE
Service RecHandle: 0x10006
Service Class ID List:
"Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 4
"OBEX" (0x0008)
Profile Descriptor List:
"Phonebook Access" (0x1130)
Version: 0x0100
Any idea what might be necessary to get access to the phone book?
There's nothing in the phone's UI to enable it (Android 2.2, HTC Sense).
You probably need to connect HFP first, otherwise some phones might
reject the PBAP session. If you're interested, I suggest you try oFono.
Just make sure you have "Enable=Gateway" in /etc/bluetooth/audio.conf
and then you can use ofono/test/enable-modem to connect HFP.
Cheers,
Mikel