Re: Remove a bluetooth profile from android ICS (bluez)

1,699 views
Skip to first unread message

Pavan Savoy

unread,
Sep 23, 2012, 11:55:51 PM9/23/12
to android-...@googlegroups.com
On Fri, Sep 21, 2012 at 11:53 AM, Ed Embedd <ed.e...@gmail.com> wrote:
> Hi,
> I'm trying to remove some of the audio profiles that come with android ICS
> bluetooth.
> I experimented with success on a linux box the audio.conf editing method,
> adding to "disable=" line the unwanted profiles.
> Unfortunately under android this method doesn't seem to work properly, in
> fact not all the profiles were disabled after restarting bluetooth, for
> example voice gateway doesn't want to disappear.
> Moreover, adding "control" profile breaks the bluetooth activation.

Some profiles like HFP/HSP (or opp/pbap not in Android BlueZ) -
doesn't depend on BlueZ - so having them not having them in
audio.conf might not make a difference.
However, profiles can certainly be disabled this way - for example
A2DP source role / sink role can be enabled/disabled this way for
sure.

AVRCP too, has some in code modification for Android which you might
want to check out,
grep "ANDROID" external/bluetooth/bluez/ to figure out..

Thanks & Regards,
Pavan Savoy.

> So i'm asking if someone know what's the proper procedure to do this under
> android systems.
>
> thanks in advance.
>
> Ed
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/Dd7Zo4avJNEJ.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platfo...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.



--
--Pavan Savoy

ramakrishna k

unread,
Sep 24, 2012, 1:37:39 AM9/24/12
to android-...@googlegroups.com
Hi Pavan,

I am also trying to do something like this. But in my case, i want to
switch off/on profiles dynamically. I could achieve this for the
profiles which are controlled by Android(ex: HFP/HSP, OPP, PBAP). If i
want to control the profiles managed by BlueZ, is it possible to
control them dynamically?

thanks
siva ramakrishna

Pavan Savoy

unread,
Sep 24, 2012, 1:41:59 AM9/24/12
to android-...@googlegroups.com

BlueZ profiles enabling/disabling pretty much means the dbus objects being either registered or not. I suppose you could still call function of BlueZ to remove such objects say org.bluez.AudioSource and unregister them at runtime...
But it would involve new functions though....

Droid sent - Ignore typos

Ed Embedd

unread,
Sep 24, 2012, 4:26:39 AM9/24/12
to android-...@googlegroups.com
Thank You very much for your time, 
I was able to remove almost all the audio profiles with the exception of the "voice
gateway".
I'm working on a TI evaluation board with android ICS AOSP, so I can modify also low level code but i can't find 
any reference regarding this "voice gateway".

Service Name: Voice Gateway
Service RecHandle: 0x10001
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 11
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100


I successfully removed AVRCP, audio sink, source and the:

Service Name: Headset Audio Gateway
Service RecHandle: 0x10001
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 12
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0102

Service Name: Hands-Free Audio Gateway
Service RecHandle: 0x10002
Service Class ID List:
  "Handsfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 13
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105

So actually i don't know the origin of this "voice gateway" and the source files that refer to this. 
Have You any idea?

2012/9/24 Pavan Savoy <pavan...@gmail.com>

On Fri, Sep 21, 2012 at 11:53 AM, Ed Embedd <ed.e...@gmail.com> wrote:
> Hi,
> I'm trying to remove some of the audio profiles that come with android ICS
> bluetooth.
> I experimented with success on a linux box the audio.conf editing method,
> adding to "disable=" line the unwanted profiles.
> Unfortunately under android this method doesn't seem to work properly, in
> fact not all the profiles were disabled after restarting bluetooth, for
> example voice gateway doesn't want to disappear.
> Moreover, adding "control" profile breaks the bluetooth activation.

Some profiles like HFP/HSP (or opp/pbap not in Android BlueZ) -
doesn't depend on BlueZ  - so having them not having them in
audio.conf might not make a difference.

Do you know where I can find some documentation about this android dependencies,
I really would like to have full control on my android bluez.

I really appreciate your help, thanks.

ramakrishna k

unread,
Oct 5, 2012, 5:29:02 AM10/5/12
to android-...@googlegroups.com
Hello,
I have tried disabling the audio source/sink by modifying the
audio.conf file. But none of my changes are reflecting? I just rebuilt
the entire source code and downloaded the images. I am trying this on
Galaxy nexus device. And also i tried adding some new functions in
source.c which i am accessing from native code. But always i get
unknown method with signature "" and fails. Sometimes, i doubt whether
my bluez changes are really reflecting. Can any guide me on this.?

thanks

Ed Embedd

unread,
Nov 2, 2012, 7:30:23 AM11/2/12
to android-...@googlegroups.com
Adding to audio.conf:

Disable=Source,Sink

works for me.

Unfortunately doesn't work for hfp hsp where I had to remove the phone and telephony apk from the image and also patch some code

prasanna karthik

unread,
Jan 28, 2013, 5:19:35 AM1/28/13
to android-...@googlegroups.com
ram

I've bluez5 and I need PBAP /HFP of it and I want to port the bluez stack to android

How did you configure it?

Let me know
-prasanna
Reply all
Reply to author
Forward
0 new messages