yashsingh1/xdaforums huggingface dataset:
[Hero CDMA General] rgildoss:
Motorola Droid

This is the Motorola Droid file..

Bluetooth Features by release

Android 2.0 release (Eclair)

Java API features

Bluetooth on / off

Device discovery

RFCOMM Server and Client sockets

Automatic RFCOMM channel lookup and SDP record advertisement via SDP UUID

Supports most RFCOMM use-cases, including peer-to-peer communication and gaming

See http://developer.android.com/reference/android/bluetooth/package-summary.html for the latest javadoc.

Platform features

Based on Bluez 4.47 with Linux Kernel 2.6.29

Bluetooth 2.1+EDR host stack

Support for auto-pairing with '0000' devices

Support for Secure Simple Pairing

Headset Profile 1.1 in Audio Gateway role

Handsfree Profile 1.5 in Audio Gateway role

Three way calling

Phonebook over AT commands

Volume synchronization

eSCO

Bug fixes and compatibility improvements

Stereo Bluetooth (A2DP 1.2) in Source role

AVDTP 1.2 in Acceptor and Initiator roles

GAVDTP 1.0 in Acceptor and Initiator roles

44.1 khz, stereo, software SBC codec

Remote Control (AVRCP 1.0) in Target role

AVCTP 1.3 in Target role

play/pause/stop/prev/next

Object Exchange Protocol (OBEX 1.1)

Object Push Profile (OPP 1.0)

Push Client and Push Server roles

Phone Book Access Profile (PBAP 1.0)

Phone Book Server Equipment (PSE) role

Example products

Motorola Droid
[Hero CDMA General] rgildoss:
Android 1.5 & 1.6 release (cupcake / donut)

Android 1.5 & 1.6 release (cupcake / donut)

Platform features

Based on Bluez 3.36 with Linux Kernel 2.6.27

Bluetooth 2.0+EDR host stack

Support for auto-pairing with '0000' devices

Headset Profile 1.1 in Audio Gateway role

Handsfree Profile 1.5 in Audio Gateway role

Three way calling

Phonebook over AT commands

Volume synchronization

eSCO

Extensive bug fixes and compatability improvements

Stereo Bluetooth (A2DP 1.2) in Source role

AVDTP 1.2 in Acceptor and Initiator roles

GAVDTP 1.0 in Acceptor and Initiator roles

44.1 khz, stereo, software SBC codec

Remote Control (AVRCP 1.0) in Target role

AVCTP 1.3 in Target role

play/pause/stop/prev/next

Qualifications

QDID B015261: Host stack (SDP, L2CAP, GAP, RFCOMM, SPP, AVCTP, AVRCP, GAVDP, AVDTP, A2DP)

QDID B015262: EPL for HTC Sapphire (HSP, HFP)
[Hero CDMA General] rgildoss:
Android 1.0 & 1.1 release

Android 1.0 & 1.1 release

Platform features

Based on Bluez 3.36 and Linux Kernel 2.6.25

Bluetooth 2.0+EDR host stack

Headset Profile 1.0 in Audio Gateway role

Handsfree Profile 1.5 in Audio Gateway role

Three way calling

Phonebook over AT commands

Qualifications

QDID B014524: Host stack (SDP, L2CAP, GAP, RFCOMM, SPP)

QDID B014624: EPL for HTC Dream (HSP, HFP)

Example products

HTC Dream / T-Mobile G1
[Hero CDMA General] rgildoss:
more info here

http://developer.android.com/reference/android/bluetooth/package-summary.html

thats some intresting feed back ....
[Hero CDMA General] rgildoss:
and yet more info

http://android.modaco.com/content/t...aco-com/303604/improving-a2dp-is-it-possible/
[Hero CDMA General] rgildoss:
more info...Although taking the phone off hands free didnt work for me at all ....

http://xdaforums.com/showthread.php?t=518918&page=2

this is intresting though :
[Hero CDMA General] rgildoss:
Google android report issue

http://code.google.com/p/android/issues/detail?id=2807#c26

seems its not just the Hero but alot of diffrent phones ....
[Hero CDMA General] Roman G:
This is what I know and again it's not much!

I have been trying to find a fix for this for more than a month, most of the links you have provided I have already read!

The link about disconnecting the phone portion of the bluetooth made perfect since to me, but alas no help!

Not sure if you are aware but, Darch is trying to find a fix for this but I don't think he has! He did tell me he thought he had it fixed but had no BT device to see if it worked, on his latest legend release I got the same results! Here is a quote from Darch!

Originally Posted by darchstar

check in the .conf files in /system/etc/bluez and tell me if you find any settings that are similar to your BT headset and uncomment them. then tell me if they work

I am still not sure how I am supposed to access this, through root explorer or ADB or some other means!

But at any rate I have been using root explorer to access, which seems to be working fine! I have not edited anything as I have no idea where to start, an really don't know if this is where it would need to be done at!

One thing I did try though is download a copy of fresh 1.5 and extracted the files:audio.conf, hdid.conf, input.conf, threw them on the SD card and used root explorer and replaced what was in the bluez folder with those, did not change anything!

And lastly if you go to the bluez website they have a new version of the BT stack that was just released on the 26th of march, not sure if this update is in the newest rom or not?

http://www.bluez.org/

Thats about all I know at this point, I am determined to get this fixed though, as I don't think it will be fixed when the OTA comes out!

P.S

BT works flawless on 1.5, so why not on 2.1?
[Hero CDMA General] rgildoss:
see these ....

04-12 13:56:22.904 E/A2dpAudioInterface( 56): push_mm_data: timeout

04-12 13:56:23.064 E/A2dpAudioInterface( 56): push_mm_data: timeout

04-12 13:56:23.226 E/A2dpAudioInterface( 56): push_mm_data: timeout

04-12 13:56:23.494 E/A2dpAudioInterface( 56): push_mm_data: timeout

i can creat these at will......Just by putting the phone in my pocket or close to my chest with the screen facing my chest....

by the way ..everyone of those messages is a audio cut off for me ..everytime you see that message the music stopped for a split second ...
[Hero CDMA General] Roman G:
Well I just tried an experiment by deleting all 3 of those file that I mentioned, and I got the same results, so I am not sure what those files are for, or for that matter what Darch was talking about editing them!

Roman
[Hero CDMA General] rgildoss:
i think this could be a bitpool problem .. some use a higher bitpool to increase sound quality, but the increase causes hickups and cutoffs ...onlything is i dont know were the bitpool is or what its set at..

by the way , i dont know **** about linux but im learning really fast ..lol
[Hero CDMA General] rgildoss:
this is were bitpool is set in a windows device ..

(all DWORD values are decimal)

/HKLM/Drivers/BuiltIn/BtA2dpSnd

remove any Priority256 value

HKLM/Drivers/BuiltIn/WaveDev,

Priority256=149

/HKLM/Software/Microsoft/Bluetooth/AudioGateway

Capability=37

/HKLM/Software/Microsoft/Bluetooth/A2DP/Settings

UseJointStereo=0

BitPool=58

MaxSupportedBitPool=80

Remove all other values from this key including SampleRate

cant seem to find it in the android ..anyone know were it is ?
[Hero CDMA General] Roman G:
I just did a search of the current bluetooth stack and did not come up with anything that relates to bitpool, I am thinking it's called something else in Android!

Edit:

I did find this, but have no idea what it is!

http://www.netmite.com/android/mydroid/donut/external/bluez/utils/sbc/sbcenc.c
[Hero CDMA General] Roman G:
This is an interesting read as well!

http://www.mail-archive.com/android-porting@googlegroups.com/msg08059.html

I think what we are looking for might be in there!
[Hero CDMA General] rgildoss:
D/A2DP ( 629): bluetooth_a2dp_hw_params sending configuration:

D/A2DP ( 629): channel_mode: JOINT STEREO

D/A2DP ( 629): frequency: 44100

D/A2DP ( 629): allocation_method: LOUDNESS

D/A2DP ( 629): subbands: 8

D/A2DP ( 629): block_length: 16

D/A2DP ( 629): min_bitpool: 2

D/A2DP ( 629): max_bitpool: 50

D/A2DP ( 629): MTU: 895

D/A2DP ( 629): frame_duration: 2902 us

D/A2DP ( 629): allocation=0

D/A2DP ( 629): subbands=1

D/A2DP ( 629): blocks=3

D/A2DP ( 629): bitpool=50

I/Bluetooth AT recv( 709): AT+VGS=07

you see bitpool: 50?

thats our setting but what file is it in ?

we need to edit that first make it 0
[Hero CDMA General] Roman G:
It also appears that we have a Texas Instruments BT chip in the phone!

If you extract the 2.1 RUU and do a search for "hciattach" it says Texas Instruments BT chip in there!
[Hero CDMA General] Roman G:
And where did ya find that at!
[Hero CDMA General] rgildoss:
in the logs on the link you last posted ... there must be a config file maybe in system/data folder
[Hero CDMA General] rgildoss:
i think this is the file

liba2dp.c
[Hero CDMA General] Roman G:
I think you may be right! Will check it out!
[Hero CDMA General] rgildoss:
the problem is that's the file before compile i believe ....we wont be able to make changes if that's the case i would think there would be an xml file somewhere we can make changes though ..
[Hero CDMA General] Roman G:
Hm....

I just made some changes, and pasted the file in the systems folder, I guess I will see what happens!

If you open the file with root explorer on your phone it's much easier to read than on the computer!

Edit:

You can also edit it right on your phone!

Edit:

Don't try this!
[Hero CDMA General] Roman G:
Okay so here is an update, after I edited that file I rebooted and now I am stuck on the HTC screen!

Not sure what thats about!

I guess I need to go into recovery and wipe, but will try to pull the battery and reboot first!
[Hero CDMA General] rgildoss:
yeah i think that files has to be compiled with the kernel if you make changes ...there must be another file we can change
[Hero CDMA General] Roman G:
Ok, so I just ran the 2.1 RUU again and got it back up!

Got a few things to take care of and then I will back at it!

Keep me updated!
[Hero CDMA General] Roman G:
Okay so I just did another 2.1 RUU, can't leave the dam thing alone!

I tried to edit those files again while I was listening to BT audio with no change, and as soon as I rebooted I got stuck at the HTC screen.

Thats where I am at!
[Hero CDMA General] rgildoss:
were are the files your editing ?

i only found one so far and its liba2dp.su
[Hero CDMA General] rgildoss:
i also did the test on a winmobile phone ( my Touch pro ) and i was able to make it cut off just like the hero, just by changing the bitloop to 63 ( from 50 ) ..once i lowered it to 32 , it is playing flawlessly.. but thats on winmo phone...

now if we could just do it on android to test..
[Hero CDMA General] Roman G:
I guess it was just that one I was editing!

Like I said I got no change whatsoever!

I wonder because I am using the 2.1 ruu is why it keeps hanging on the HTC screen.

Even when I try to wipe back to factory defaults it still hangs, at least I know the RUU works though!

I really don't mind doing much to my phone, so if ya come up with something and you don't wanna try it on your phone let me know I will do it!

Ya there has to be a way to change it on ours just like the winmo phone! I did PM darch so maybe he will pop in and give us some insight!

I guess it's just the 2 of us that are plagued with this!
[Hero CDMA General] rgildoss:
well the disappointment here is that we are in XDA a site known for fixing and creating patch's and no one except us has chimed in. People are more concerned with making their phones look good rather then fixing problems these days. the truth is with the right tools everyone can become a chef ( i was a chef at ppcgeeks for sometime in the Diamond/touch pro world ).. when it comes to fix a problem, no one seems to care.. this thread has received 360 views, it is loaded with info and research but no one else has responded ..oh well ..i will continue to search for a fix on this.. my feeling is this will not be fixed with the final release ..

as for us only having this issues? all the places i have read, alot of people have this issue including the DROID and Nexes One.. i dont think this is a issue with the hero but a issue with android 2.1 ...weird part is there are other phones that dont have this problem...

i really do think its the bitloop for sure ..wish i could somehow test it though ...
[Hero CDMA General] Roman G:
I totally agree with you on that! I just sent a rather lengthy PM to gbhil over on AC to maybe get some assistance!

I was just teasing ya about us being the only ones!

What is it you are trying to test?
[Hero CDMA General] rgildoss:
Does your hero say " with Google " on the back?
[Hero CDMA General] Roman G:
Yes it does, and does yours, and what rom are you running?
[Hero CDMA General] rgildoss:
mine does as well.. reason i ask is i wonder if there is different with ones that have the logo and others that dont.

i am running the leaked RUU ..the new one .. no modifications at all..just strait up RUU
[Hero CDMA General] CharlyDigital:
I am running Fresh 2.0d. I do not have the "with google" and I have never been able to get BT to run properly, on 2.1 ROM's, for making calls from my premier deck. I can pair it up and media plays fine but when I go to make call it says "no connection" "Name not found" and drops off. I can then go right back to the media player and listen to pandora or whatever. Yes, if I go back to 1.5 all functions properly.
[Hero CDMA General] Roman G:
That is the same thing I am running as well!

It's hard to know though as I we are the only 2 with this problem:D

Check out this page:

I did a google search and came up with this:

Change the baud rate of your Bluetooth module to 57600 baud, especially if you do not use an Arduino ... Take your Android phone and go to the main screen. ...

http://www.amarino-toolkit.net/doc/quick_guide.html

By the way I am leaning towards the baud rate! You have your theory and I have mine, but either way we will fix this, or stomp on our phone trying!

I gots to go make dinner now!

Let me know what you find out!
[Hero CDMA General] rgildoss:
i like that theory too.. were can we change the baud rate of the BT at?
[Hero CDMA General] rgildoss:
well then ...there goes that theory ..lol thanks
[Hero CDMA General] CharlyDigital:
no problem. A buddy of mine has a droid and also has problems in this area. I will donate heavily if you guys are able to fix this.
[Hero CDMA General] Roman G:
I am still working on that as well!

And I have to go MAKE DINNER, or the wifes gonna be pissed!
[Hero CDMA General] rgildoss:
i will donate heavy to

....
[Hero CDMA General] Roman G:
What you gonna by yourself beer:rolleyes:
[Hero CDMA General] qngds:
podcasts thru regular bluetooth

Thanks you guys for taking the time to figure this out. I love to listen to podcasts on regular bluetooth when running, really miss this since touch pro.

I was interested to read that it did work for someone on 1.1? I haven't gotten it to work, but I'm sure I flashed this phone the day I got it so I don't have a point of reference lol.
[Hero CDMA General] galt:
Ditto problem here on a "with google" Sprint Hero also running Flipz 2.0d 2.1 ROM. Would be happy to donate to a fixer.
[Hero CDMA General] Roman G:
Ya it works fine for me on 1.5, flawless in fact as well as others! Some it does not work on 1.5 but works perfect on 2.1! It's really hit or miss, 50/50 across the board!

Strange stuff man!!!!!

Thanks for the support!!
[Hero CDMA General] danknee:
1.5 bt worked great for me, but 2.1 introduces expanded bluetooth features. I have had the a2dp hiccuping on every 2.0+ ROM I have tried and I have tried them all.

I use a bluetooth OBD II adapter in my car and it only works on Android 2.0+. I wish a2dp worked as well as in 1.5, but I also need the bt to have the ability to search SDP records for an open RFCOMM port, and open it (for the obd adapter). 1.5 cannot do this.
[Hero CDMA General] rgildoss:
damage 1.1 didnt have the problem i dont think...
[Hero CDMA General] Roman G:
I got **** dude!!!!!!!!!!

Been at it for 12 hours, and now I am going to bed!

Hope you got more than I got!
[Hero CDMA General] rgildoss:
Day 2 ... we shall see how far we get today
[Hero CDMA General] daryelv:
I've been watching the progress on this thread. If there's anything I can help with, let me know. I can do editing of the XML files found in the APKs as well as the classes.dex files that are found in the JARs. I just need to know which to look for changes in and what you're trying to change (like the bitloop setting mentioned earlier in the thread).

I've always had BT audio (Music) problems (Stock 1.5 and 2.1). My skipping was VERY bad with 1.5 but got better with the 2.1 RUU and works almost perfect with the 2.1 Legend.

My BT has worked fine with audio (Phone Call) functions. I have a "Non-Google" phone too and have been using a S9-HD headset.

-Daryel
[Hero CDMA General] rgildoss:
Always great to have more people on this issue.. I am a windows guy and all this stuff is sort of new to me ( i did do some satellite TV coding in the past which is all linux based ) so im no stranger to Linux but by no means know what i am doing in it..

I haven't been able to find a settings file for a2dp, although there is aliba2dp.su file. i think any modifications to this file will require a kernel compilation. i will do a write of what i have found and we can probably start there...
[Hero CDMA General] Roman G:
Where did ya find that file at I was looking for it lastnight?

Also the main.conf, audio.conf and input.conf, I found a couple of websites that mention this is where setting are, even on the bluez website mentions it but I have adjusted the **** out of those setting to no avail!

Atleast I did not have to RUU:D
[Hero CDMA General] rgildoss:
Looks like 3 phones have this issue with audio being cut off or lagging durring playback with BT headsets or hands free car stereos.

•	Droid

•	Hero ( both models )

•	Nexes One

Lets talk about the hardware first.

Although most phones have different hardware, they all use the same slandered, meaning they all use the same driver and hardware setting files. Now the setup files my differ as some phones funnel different things through BT-a2dp. In the Hero’s case they funnel a lot of stuff, things like notifications, ringtones, call status, file transfer’s and much more. This brings us to the first suggestion, baud rate.

The baud rate could infact be bottlenecked and could well create this issue for us . I haven’t figure out how to change the baud rate as of yet.. If we could play with the BT baud rate, we could then try different values and identify the outcome.

The other is BITLOOP . what I have read about BITLOOP is that the higher the value the better sound quality you get. However better sound quality creates audio cut off ( some sort of threshold ) ..this has been prevent to be true on my touch pro ( windows ) as it is much easier to change the values ( registry edit s) . I haven’t been able to find this setting in Android at all, my guess is that its in the liba2dp.us file that again I think needs to be compiled after any changes.

As for why some users work with no issues and others like us have issues?

my theory in this is were the phone was made. I have read ( not a reliable source though ) that the heros “with Google” brand were made cheaper in China and the ones with without the brand were built elsewhere.

So this is were I am at for the moment.

I could be totally wrong here but this is what I gathered from reading the last couple days.

Also I to have a S9-HD headset ( not without its own problems )
[Hero CDMA General] rgildoss:
worth also to say that the Samsung Moment DOES NOT have this issue at all..

Makes it hard to think its a Android 2.1 issue..
[Hero CDMA General] rgildoss:
can you give us a read of those files ?

i would be interested to see their format and whats in them
[Hero CDMA General] Roman G:
Gotta take my daughter to school and I will when I get back!
[Hero CDMA General] Roman G:
Check out this page, very interesting read:

http://www.mail-archive.com/android-porting@googlegroups.com/msg07962.html
[Hero CDMA General] rgildoss:
# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)

# Defaults to HCI

#SCORouting=PCM

that looks odd..default is HCI but its set to PCM ....

let me look into that further
[Hero CDMA General] rgildoss:
http://www.mail-archive.com/smartphones-standards@linuxtogo.org/msg00570.html

a good read ...
[Hero CDMA General] Roman G:
I keep reading about "hciattach tool" any idea where I can find this at?
[Hero CDMA General] Roman G:
This is some frustrating ass ****!

I have been making changes to stuff and I get no different results!

At least when I was changing that other file the phone would not boot, so I knew something was happening:confused:
[Hero CDMA General] Roman G:
Take a look at this file!

system/bin/hciattach.c

It appears to be the one, but I can't figure out which value to change!
[Hero CDMA General] rgildoss:
its already compiled file ..nothing in there will make sense ...
[Hero CDMA General] Roman G:
I took out a few lines at the beginning to get it below 30000 characters:eek:
[Hero CDMA General] rgildoss:
yeah that looks to be c code ... dont want to make any changes there...
[Hero CDMA General] Roman G:
I have made a bunch and everything stays the same, really pissing me off!

I am about to delete the ***** and see what happens!

Any luck with those 3 files, main, input and audio!

By the way do you have root explorer installed from the market?
[Hero CDMA General] pfer10:
I can confirm that DC 2.07 and a Jabra 820 skips also. Did you see HTC has their own version of Bluez?
[Hero CDMA General] rgildoss:
you have a link for this ?

i would love to look at it
[Hero CDMA General] pfer10:
Here you go.

https://www.bluetooth.org/tpg/RefNotes/HTC_BlueZ_Stack_RIN_Datasheet3.doc
[Hero CDMA General] rgildoss:
thank you sir ...this may come in very handy
[Hero CDMA General] pfer10:
Try this:

/menu/settings/wireless & networks/bluetooth settings/long click on your device and disable phone.

I would try it but by Jabra is at work. :D
[Hero CDMA General] danknee:
I did this, but still get a2dp hiccuping (connected to media only).
[Hero CDMA General] pfer10:
What other radios do you have on? Did you try it with the gps/phone/wifi off?
[Hero CDMA General] danknee:
Yep, I turned off everything except bluetooth and I even used Music on the sdcard to rule out streaming issues. It has consistently plagued me on every ROM except for those based around 1.5.
[Hero CDMA General] danknee:
I wanted to point out that my phone tethers perfectly with my laptop (HDX 18t- Win 7 64-bit) over A2DP BT.. This includes having Wifi, GPS, BT, multiple apps up and streaming audio from Droid Live on the phone while it plays flawlessly.

The only device I have an issue with is a Sony Xplod car deck that I bought solely (on clearance) for the purpose of Android BT tethering. This deck works great if I use Fresh 1.1 or my stock nandroid, but hates 2.0+ everything.
[Hero CDMA General] rgildoss:
the problem seems to be only with audio ..
[Hero CDMA General] Roman G:
I have no real news, still working on stuff!

Got a couple of websites that have some good info on them!

Also looking for a file "brf6300.bin" if ya come across it let me know! I believe it's in 1.5 roms and below, it appears to be the BT firmware.

http://source.android.com/projects/bluetooth-faq

http://xdaforums.com/showthread.php?t=527027

Roman
[Hero CDMA General] rgildoss:
my guess is you would rename the brf6300.bin to brf6350.bin and try it ?
[Hero CDMA General] Roman G:
Okay nevermind about that file!

****!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Correct me if I am wrong, but I would think that when you delete firmware file that said hardware would not work, so then why is my BT working?

Regardless of what I change or delete, or stomp on I get NO change!!!!!!!!!!

WTF!!!!!!!!!!!!!
[Hero CDMA General] rgildoss:
hmm well that file might just be teilling the system on how to use the BT ..even without it probaly still work ... if you can get a copy of the file and try your idea i think its worth the effort ... besides i read that the file use suggest is to fix functions within BT , like play, rev, fwrd, stop etc ...