• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[REF] Fix bluetooth A2DP failing to connect (root required)

Search This thread

spoidar

Senior Member
Aug 13, 2010
153
59
Tried connecting my Galaxy S to some A2DP speakers, found it would pair then fail to connect, constantly reporting "Paired but not connected".

After a bit of poking around, I found in /system/etc/bluez/audio.conf:
Code:
# Configuration file for the audio service

# This section contains options which are not specific to any
# particular interface
# NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
# devices, and the local device is a Source
[General]
Enable=Sink,Control
Disable=Headset,Gateway,Source

# Switch to master role for incoming connections (defaults to true)
#Master=true

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=PCM

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
#AutoConnect=true

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
#[Headset]

# Set to true to support HFP (in addition to HSP only which is the default)
# Defaults to false
#HFP=true

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
#MaxConnections=1

# Just an example of potential config options for the other interfaces
[A2DP]
SBCSources=1
MPEG12Sources=0

[AVRCP]
InputDeviceName=AVRCP

Changed to:
Code:
# Configuration file for the audio service

# This section contains options which are not specific to any
# particular interface
# NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
# devices, and the local device is a Source
[General]
Enable=Sink,Control,Headset,Gateway,Source
#Disable=

# Switch to master role for incoming connections (defaults to true)
#Master=true

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=PCM

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
#[Headset]

# Set to true to support HFP (in addition to HSP only which is the default)
# Defaults to false
HFP=true

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
#MaxConnections=1

# Just an example of potential config options for the other interfaces
[A2DP]
SBCSources=1
MPEG12Sources=0

[AVRCP]
InputDeviceName=AVRCP

Rebooted, and everything works like a charm. Probably only need to enable the additional profiles.

Here's the diff for those so inclined:
Code:
--- audio.conf.dist
+++ audio.conf
@@ -5,8 +5,8 @@
 # NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
 # devices, and the local device is a Source
 [General]
-Enable=Sink,Control
-Disable=Headset,Gateway,Source
+Enable=Sink,Control,Headset,Gateway,Source
+#Disable=
 
 # Switch to master role for incoming connections (defaults to true)
 #Master=true
@@ -19,7 +19,7 @@
 # connections. Some headsets that support both profiles will only connect the
 # other one automatically so the default setting of true is usually a good
 # idea.
-#AutoConnect=true
+AutoConnect=true
 
 # Headset interface specific options (i.e. options which affect how the audio
 # service interacts with remote headset devices)
@@ -27,7 +27,7 @@
 
 # Set to true to support HFP (in addition to HSP only which is the default)
 # Defaults to false
-#HFP=true
+HFP=true
 
 # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
 #MaxConnections=1
 
Last edited:
  • Like
Reactions: GixxGle and Ozdemon

kloodee

Senior Member
Nov 24, 2005
271
47
wiimote support

interesting to know that, thanx for sharing buddy

is it possible to get the sgs connected to a Wiimote? i think i had a similer problem when i tried to pair it with the wiimote, it seems to pair fine but it just wont connect, i appreciate your support :)
 

spoidar

Senior Member
Aug 13, 2010
153
59
interesting to know that, thanx for sharing buddy

is it possible to get the sgs connected to a Wiimote? i think i had a similer problem when i tried to pair it with the wiimote, it seems to pair fine but it just wont connect, i appreciate your support :)
The Wiimote is a different beast - it's a HID device, and I don't know that the hidp module is included in the Galaxy kernel, or whether the proprietary bluetooth interface supports it.

Will it work with car based handsfree?
Yep, should do.
 

aridoasis

Senior Member
Jan 11, 2009
251
17
Surrey
i'm pretty sure i'm missing something...
i'm using linda explorer
i got to /system/etc/bluez/
click on audio.conf
so, i'm made to select what to open the file with
the only logical thing for me to use was dropbox text editor

is there a special file editor i need to use?
 

spoidar

Senior Member
Aug 13, 2010
153
59
Your device needs to be rooted, and you need to use Root Explorer - you won't have permission to modify the file without root privileges.
 

spoidar

Senior Member
Aug 13, 2010
153
59
Any tool that will let you remount /system read-write, and write files as root will do - there may be others, but Root Explorer works particularly well, so that's the only one I'm aware of. I just did it from the command line, but you need a level of comfort with linux for that.
 

vrajitoru

Member
May 25, 2006
13
0
It works like a charm. Thank you very much man.
I am a android noob but i have figured out from rooting to editing the audio.conf
And now it connects to all my headset, helmet a2dp headset and to my car's bt system.
I have to say that ia had big prtoblems in the past with bt. Sometimes when a headset was connected an tried to call it frozed my phone to the point that i had to took out the battery to reset it. Right now, after the process, i used my phone for 3 days with intensive BT activitiy (from calls to music and to all headsets) and no freeze.
 

pathuri97

Senior Member
Nov 11, 2010
286
32
Bangalore
It works like a charm. Thank you very much man.
I am a android noob but i have figured out from rooting to editing the audio.conf
And now it connects to all my headset, helmet a2dp headset and to my car's bt system.
I have to say that ia had big prtoblems in the past with bt. Sometimes when a headset was connected an tried to call it frozed my phone to the point that i had to took out the battery to reset it. Right now, after the process, i used my phone for 3 days with intensive BT activitiy (from calls to music and to all headsets) and no freeze.

Can I know after editing and saving audio.conf file - what are other steps to be performed in order to solve this problem?

Though I rebooted - the same problem continues.

Pl help?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Tried connecting my Galaxy S to some A2DP speakers, found it would pair then fail to connect, constantly reporting "Paired but not connected".

    After a bit of poking around, I found in /system/etc/bluez/audio.conf:
    Code:
    # Configuration file for the audio service
    
    # This section contains options which are not specific to any
    # particular interface
    # NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
    # devices, and the local device is a Source
    [General]
    Enable=Sink,Control
    Disable=Headset,Gateway,Source
    
    # Switch to master role for incoming connections (defaults to true)
    #Master=true
    
    # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
    # Defaults to HCI
    #SCORouting=PCM
    
    # Automatically connect both A2DP and HFP/HSP profiles for incoming
    # connections. Some headsets that support both profiles will only connect the
    # other one automatically so the default setting of true is usually a good
    # idea.
    #AutoConnect=true
    
    # Headset interface specific options (i.e. options which affect how the audio
    # service interacts with remote headset devices)
    #[Headset]
    
    # Set to true to support HFP (in addition to HSP only which is the default)
    # Defaults to false
    #HFP=true
    
    # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
    #MaxConnections=1
    
    # Just an example of potential config options for the other interfaces
    [A2DP]
    SBCSources=1
    MPEG12Sources=0
    
    [AVRCP]
    InputDeviceName=AVRCP

    Changed to:
    Code:
    # Configuration file for the audio service
    
    # This section contains options which are not specific to any
    # particular interface
    # NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
    # devices, and the local device is a Source
    [General]
    Enable=Sink,Control,Headset,Gateway,Source
    #Disable=
    
    # Switch to master role for incoming connections (defaults to true)
    #Master=true
    
    # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
    # Defaults to HCI
    #SCORouting=PCM
    
    # Automatically connect both A2DP and HFP/HSP profiles for incoming
    # connections. Some headsets that support both profiles will only connect the
    # other one automatically so the default setting of true is usually a good
    # idea.
    AutoConnect=true
    
    # Headset interface specific options (i.e. options which affect how the audio
    # service interacts with remote headset devices)
    #[Headset]
    
    # Set to true to support HFP (in addition to HSP only which is the default)
    # Defaults to false
    HFP=true
    
    # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
    #MaxConnections=1
    
    # Just an example of potential config options for the other interfaces
    [A2DP]
    SBCSources=1
    MPEG12Sources=0
    
    [AVRCP]
    InputDeviceName=AVRCP

    Rebooted, and everything works like a charm. Probably only need to enable the additional profiles.

    Here's the diff for those so inclined:
    Code:
    --- audio.conf.dist
    +++ audio.conf
    @@ -5,8 +5,8 @@
     # NOTE: Enable=Sink means that bluetoothd exposes Sink interface for remote
     # devices, and the local device is a Source
     [General]
    -Enable=Sink,Control
    -Disable=Headset,Gateway,Source
    +Enable=Sink,Control,Headset,Gateway,Source
    +#Disable=
     
     # Switch to master role for incoming connections (defaults to true)
     #Master=true
    @@ -19,7 +19,7 @@
     # connections. Some headsets that support both profiles will only connect the
     # other one automatically so the default setting of true is usually a good
     # idea.
    -#AutoConnect=true
    +AutoConnect=true
     
     # Headset interface specific options (i.e. options which affect how the audio
     # service interacts with remote headset devices)
    @@ -27,7 +27,7 @@
     
     # Set to true to support HFP (in addition to HSP only which is the default)
     # Defaults to false
    -#HFP=true
    +HFP=true
     
     # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
     #MaxConnections=1
    1
    Does anybody know how to fix problem with bluetooth headset?
    I have a sony Dr-BT50 which my SGS even can not discover it, i can connect the headphone to my laptop or nokia n97 but SGS no way.
    here is the DR-BT50 specification:
    Diaphragm : PET
    Function : A2DP, AVRCP, HFP (1.0), HSP (Ver. 1.1, Vol. 2, Part K:6)
    Interface : A2DP, AVRCP, HFP, HSP
    Bluetooth® Technology : Bluetooth Version 2.0

    If you can't discover it, I'm not sure what to tell you - I don't have access to that headset, and it's very difficult to debug without seeing what's happening.
    1
    kind off topic but Please I need help

    I am running a beta rom. Bluetooth is working perfect with other phones but not with my car bluetooth.

    I tried the changes mentioned in here but not luck. However the bluetooth still works really well for other devices so i will leave it.

    Here is what i think is the problem.

    In the beta rom i am running in order to pair with other devices FROM MY DEVICE I i click search bluetooth devices and i find them. Straight afterwards i click ON MY DEVICE "pair with the device found". And this is what i think is not normal. Eventhough i am the one trying to pair is the other device the one which set the pairing code.

    My car does not find my device. I find my car's bluetooth so i try to pair with it from my device. In order to find my car i have to set my car's bluetooth to listen other devices. And here is what i think why i cannot connect. In listening mode my car is awaiting for the device that wants to pair for a code and this is what i cannot do in this rom. Like i said above Is always the other device the one that sets the pin.

    Honestly i have tried everything and still do not know how i can make it work.

    Post note: on a previous rom it worked. (but of course i am more happy with the latest beta rom)

    Please help. Hope you did not get asleep :) hope i get any bluetooth expert dev :)