It's a Lottery: Either no connection, or rSAP, or HFP

Discussions about running the rSAP app on the Samsung/Google Galaxy Nexus
Post Reply
The-Driver
Posts: 5
Joined: Tue May 21, 2013 3:11 pm

It's a Lottery: Either no connection, or rSAP, or HFP

Post by The-Driver » Tue May 21, 2013 3:34 pm

I have a rooted Galaxy Nexus with Android 4.2.2, and a Skoda Superb that is a couple of months old, and which has the Premium FSE and the Columbus navigation unit. I have used the android-rsap app since I got the car. I have not used any of the other apps, modules or workarounds.

rSAP works in principle. However, whenever I get into the car, it seems to be a lottery whether rSAP connects (maybe 50% of cases), or HFP connects (30% of cases), or the phone is not found at all (20% of cases). So sometimes turning off and on the car again seems to work, sometimes turning off and on Bluetooth seems to work, and sometimes rebooting the phone seems to work.

Sometimes, when it does not work, the rSAP app shows "Bluetooth error" (or something similar). When it does not connect at all, the cars says that it cannot find the phone (when I try to select it manually). Bluetooth is of course always turned on.

Interestingly, I told the car to work in rSAP mode only (this is a setting somewhere) but it seems to ignore this.

I haven't checked any logs yet but have now activated the options for main and HCI logs and will collect information over the next few days. Anything else I should look out for?

I know that some people have problems with Android 4.2 but these seem to be more serious in that rSAP never works.

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

Re: It's a Lottery: Either no connection, or rSAP, or HFP

Post by admin » Wed May 22, 2013 7:29 am

This is the result of a strange feature of Android and a bug in AOSP Android 4.2. The feature is that Android regularly kills background services by some complicated algorithm. This happens more often on some phones and I think it is the result of different threshold values. E.g. the HTC One allows 32 processes to be active, while the Nexus 4 only allows 16. That causes my rSAP service to be killed more often on a Nexus 4, usually about 4 or 5 times during the night without any activity on the phone at all. I think Android should take into account when a service opens a socket of any kind and just sits there and waits for a connection, but it doesn't. After trying several possibilities to fix this, the next version will set the service to "foreground" permanently, which will show an icon in the notification bar.

This Android behavior would only lead to a small chance that the connection fails, but AOSP Android 4.2 has the additional bug that it leaks Bluetooth sockets. So every time my rSAP service gets killed, one out of approximately 30 sockets is lost, until you stop and restart Bluetooth. The Bluetooth stack of AOSP Android 4.2 is full of bugs, so no wonder Samsung doesn't use it for their 4.2 Android versions...

I hope the next version of my app will fix the problems by keeping the service active. I'm currently doing some more tests and plan to release 2.3.1 in a few days.

The-Driver
Posts: 5
Joined: Tue May 21, 2013 3:11 pm

Re: It's a Lottery: Either no connection, or rSAP, or HFP

Post by The-Driver » Wed May 22, 2013 6:18 pm

I think you are right! After my post, for the last 7 times I turned on the car, I manually opened the rSAP app on my phone beforehand. (I actually did this before reading your post in order to see what error the app would show when it does not connect.) Every single time, rSAP connected correctly. So when the app is open, there does not seem to be an issue.

The-Driver
Posts: 5
Joined: Tue May 21, 2013 3:11 pm

Re: It's a Lottery: Either no connection, or rSAP, or HFP

Post by The-Driver » Thu May 30, 2013 9:49 pm

I can confirm that since the last update (with the permanent icon), this issue is resolved, and my phone has always connected using rSAP, without the need to open the app.

Post Reply

Return to “Samsung/Google Galaxy Nexus”