Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,130 Members 53,960 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
spoidar
Old
(Last edited by spoidar; 1st October 2010 at 04:57 AM.)
#1  
spoidar's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 116
Join Date: Aug 2010
Default [REF] Fix bluetooth A2DP failing to connect (root required)

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
The Following 2 Users Say Thank You to spoidar For This Useful Post: [ Click to Expand ]
 
kloodee
Old
#2  
Senior Member
Thanks Meter 16
Posts: 126
Join Date: Nov 2005
Default 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
 
ondoteam
Old
#3  
ondoteam's Avatar
Senior Member
Thanks Meter 138
Posts: 371
Join Date: Apr 2009
Location: Las Palmas
Will it work with car based handsfree?
 
spoidar
Old
#4  
spoidar's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 116
Join Date: Aug 2010
Quote:
Originally Posted by kloodee View Post
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.

Quote:
Originally Posted by ondoteam View Post
Will it work with car based handsfree?
Yep, should do.
 
aridoasis
Old
#5  
Senior Member
Thanks Meter 12
Posts: 241
Join Date: Jan 2009
Location: Surrey
sorry, but how do i pull this file? i tried copying it with linda file manager to my sd but is doesn't copy.
 
spoidar
Old
#6  
spoidar's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 116
Join Date: Aug 2010
Quote:
Originally Posted by aridoasis View Post
sorry, but how do i pull this file? i tried copying it with linda file manager to my sd but is doesn't copy.
You'll need root - I just edited the file in place, but if you have a copy on your SD card, you could use Root Explorer to paste it over the existing one after making /system R/W.
 
aridoasis
Old
#7  
Senior Member
Thanks Meter 12
Posts: 241
Join Date: Jan 2009
Location: Surrey
hmm.. i'm getting 'error opening file'
 
spoidar
Old
#8  
spoidar's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 116
Join Date: Aug 2010
Tell me what steps you're performing exactly, and I may be able to point you in the right direction.
 
aridoasis
Old
#9  
Senior Member
Thanks Meter 12
Posts: 241
Join Date: Jan 2009
Location: 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
Old
#10  
spoidar's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 116
Join Date: Aug 2010
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.

Tags
a2dp, bluetooth, galaxy s, i9000
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more

Make Your Own DIY Capacitive Stylus

The XDA Portal is a place where we like to talkabout things that are interesting, fun, and sometimes … more