BUG: Disconnect during Phonebook sync

Discussions about running the rSAP app on the HTC Desire Z
Post Reply
gemx
Posts: 13
Joined: Wed Jul 06, 2011 6:59 pm

BUG: Disconnect during Phonebook sync

Post by gemx » Wed Jul 06, 2011 7:06 pm

Hi,
first of all a big thanx for your work :D

I got it up and running at the first try - except:

Connection works fine but during the phonebook sync, the phone gets disconnected.
This always happens when syncing contact nr 20 (according to the display of the FSE).

My setup:
VW RNS 510 Komfort FSE (RSAP)
HTC Desire Z (Virtous Unity 1.26 ROM)

I even got it making calls, when i was quick enough to dial before the phonebook sync started.
Everything else works flawlessly.
Even reconnecting when starting the car etc. works fine.

I gues it's a specific phonebook entry which is causing the trouble (well nr. 20) but how do i get to know which one it is?

The HCI log is always empty and the main log just shows:

Code: Select all

07-06 18:50:58.032 I/RSAP    (13295): OUT: TRANSFER_APDU_RESP(ResultCode = 0, ResponseAPDU = {80 01 01 90 00 80 01 7E 97 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 90 00})
07-06 18:50:58.052 I/RSAP    (13295): IN:  TRANSFER_APDU_REQ(CommandAPDU7816 = {00 A4 00 0C 02 2F E2})
07-06 18:50:58.062 I/RSAP    (13295): OUT: TRANSFER_APDU_RESP(ResultCode = 0, ResponseAPDU = {90 00})
07-06 18:50:58.082 I/RSAP    (13295): IN:  TRANSFER_APDU_REQ(CommandAPDU7816 = {00 B0 00 00 0A})
07-06 18:50:58.092 I/RSAP    (13295): OUT: TRANSFER_APDU_RESP(ResultCode = 0, ResponseAPDU = {98 94 22 16 40 09 22 37 27 F9 90 00})
07-06 18:51:01.082 D/InputDispatcher( 1335): Dispatch MotionEvent [action=0] ToCurrentInputTarget: 40c44138 com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:01.282 D/InputDispatcher( 1335): Dispatch MotionEvent [action=1] ToCurrentInputTarget: 40c44138 com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:16.152 D/InputDispatcher( 1335): Dispatch KeyEvent [keyCode=82, action=0] ToCurrentInputTarget: 40c44138 com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:16.322 D/InputDispatcher( 1335): Dispatch KeyEvent [keyCode=82, action=1] ToCurrentInputTarget: 40c44138 com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:17.882 D/InputDispatcher( 1335): Dispatch MotionEvent [action=0] ToCurrentInputTarget: 40a52800 AtchDlg:com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:18.061 D/InputDispatcher( 1335): Dispatch MotionEvent [action=1] ToCurrentInputTarget: 40a52800 AtchDlg:com.android_rsap.rsap/com.android_rsap.rsap.BluetoothRSAP (server)
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): disconnected
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): java.io.IOException: Connection reset by peer
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): 	at android.bluetooth.BluetoothSocket.readNative(Native Method)
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): 	at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:314)
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): 	at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:60)
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): 	at com.android_rsap.rsap.r.a(Unknown Source)
07-06 18:51:23.602 E/BluetoothRSAPClient(13295): 	at com.android_rsap.rsap.aa.run(Unknown Source)
07-06 18:51:23.652 D/BluetoothRSAPClient(13295): setState() STATE_CONNECTED -> STATE_DISCONNECT
07-06 18:51:23.652 D/BluetoothRSAPClient(13295): setState() STATE_DISCONNECT -> STATE_LISTEN

gemx
Posts: 13
Joined: Wed Jul 06, 2011 6:59 pm

Re: BUG: Disconnect during Phonebook sync

Post by gemx » Wed Jul 06, 2011 7:19 pm

Just an addition.

It happens with the first entry from the phonebook.

The first 19 entries are from the SIM and these work.

So how do i get to know which contact is the first one it tries to sync???

admin
Site Admin
Posts: 4128
Joined: Wed Mar 23, 2011 4:12 pm

Re: BUG: Disconnect during Phonebook sync

Post by admin » Thu Jul 07, 2011 4:37 pm

Hi,

please try to create a HCI Log and send it to me by e-mail (admin (at) android-rsap.com). Since your ROM is based on HTC Sense this will likely create a 0KB file.Then it is a bit harder to find out... Did you grant PBAP access rights to your car kit and did it disconnect the first time after that?

gemx
Posts: 13
Joined: Wed Jul 06, 2011 6:59 pm

Re: BUG: Disconnect during Phonebook sync

Post by gemx » Thu Jul 07, 2011 5:27 pm

As you already guessed the HCI log has 0kb.

How do i grant PB access?

It didn't ask me about it and i couldn't find a setting.

At least i managed to create a logcat logfile and sent it to you via email.

As far as i can see from the look it opens the contacts2.db and tries to copy entries but i can't find an error in the log.

Hopefully you have an idea

Oh, and it gets disconnected whenever it tries to sync the first entry of the phonebook. The SIM contacts work fine.

after a few sec. rsap on the phone is ready again and i can reconnect but unfortunately always with the same results.

Also repairing doesn't solve the problem.

admin
Site Admin
Posts: 4128
Joined: Wed Mar 23, 2011 4:12 pm

Re: BUG: Disconnect during Phonebook sync

Post by admin » Fri Jul 08, 2011 1:21 pm

When the car kit tries to access the phone book via PBAP you get a notification on your phone where you have to allow access. If you did that once and checked "remember" (this is default) then you are never asked again. Some day I will find out where that information is stored...

A logcat output does not help to find the entry. If you have Linux running on a Bluetooth equipped PC you may use the "pbap-client" script to query the phone book. I attached a modified version. You run the attached script with

Code: Select all

./pbap-client xx:xx:xx:xx:xx:xx pb
Where xx:xx:xx:xx:xx:xx is the Bluetooth address of your phone. You find the address somewhere in the settings/phone info menu. "pb" is the main phone book. I don't remember if you have to pair the phone with the PC before the script will run.

Perhaps I find the time to create a Windows program that can query the phone book but this may take some time.

A final tip: if you are not totally in love with the HTC Sense user interface consider flashing an Android Open Source based ROM like CyanogenMod. Especially the PBAP implementation is a lot better!
Attachments
pbap-client.zip
contains modfied PBAP query script for Linux
(660 Bytes) Downloaded 174 times

gemx
Posts: 13
Joined: Wed Jul 06, 2011 6:59 pm

Re: BUG: Disconnect during Phonebook sync

Post by gemx » Sat Jul 09, 2011 5:52 pm

Thnaks but i just gave CYANOGENMOD a try and it worked out of the box.
It paired and synced all my contacts.

Also it asked about permission for accessing the phonebook which the virtous rom didn't :shock:

So probably that's the reason.

Anyway- i am happy now

djvanila
Posts: 3
Joined: Mon Jun 06, 2011 2:22 pm

Re: BUG: Disconnect during Phonebook sync

Post by djvanila » Mon Jul 18, 2011 11:41 am

I have the same problem on each drive with SENSE. Always writes: "SDP record not fixed" I think this is a problem of poor synchronization of contacts. I tried all the ROM from virtuoso, and more. Is there a simple solution?

admin
Site Admin
Posts: 4128
Joined: Wed Mar 23, 2011 4:12 pm

Re: BUG: Disconnect during Phonebook sync

Post by admin » Mon Jul 18, 2011 2:56 pm

I'm not happy with the "SDP record not fixed" message anymore because it suggests an error where there is none. I'll remove the message completely in the next version.

The only thing that matters is the implementation of the Phone Book Access Profile (PBAP) which is usually poor in the HTC Sense based ROMs (probably because they are based on older Android versions?) and better in the 2.3.x based AOSP ROMs like CyanogenMod 7.x. It seems not so easy to simply replace the PBAP in the HTC ROM so the only solution currently is to use an AOSP ROM.

Post Reply

Return to “HTC Desire Z”