Jump to content


Updating the buggy Bluetooth stack of the Desire


20 replies to this topic

#1
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hi guys,

Recently when developing a Bluetooth application for the Desire I became aware that the version of the Bluetooth stack (bluez) used for the Desire is not the same as the Nexus one.
This sucks because
a. they both claim to be android 2.1 which is not 100% true for the Desire since it is not using the same stack (this has been confirmed by a source)
b. the Bluetooth SPP profile in the Desire does not work :-(, I tested the same code on the N1 and it works.

So I was all happy to here Paul had rooted the Desire thinking I would simply go and grab the necessary modules from an N1 Rom and stick those in the Desire. I am assuming (maybe naivly) that the Kernel's + Hardware are close enough that this should simply work

So I built an update package based on the Bluetooth files found in the CM 5.0.6 N1 ROM
Sadly once I have installed it and reboot the phone I dont get past the "HTC" screen.

Logcat shows

I/vold    (   53): Android Volume Daemon version 2.0
D/AK8973  (   61): AK8973 daemon 1.3.1 Start
D/AK8973  (   61): (Library version : 1.2.1.620)
I/vold    (   53): New MMC card 'SU02G' (serial 22913023) added @ /devices/platf
orm/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa
I/vold    (   53): Disk (blkdev 179:0), 3862528 secs (1886 MB) 1 partitions
I/vold    (   53): New blkdev 179.0 on media SU02G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 1
I/vold    (   53): Partition (blkdev 179:1), 3858489 secs (1884 MB) type 0x6
I/vold    (   53): New blkdev 179.1 on media SU02G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 0
I/vold    (   53): Evaluating dev '/devices/platform/msm_sdcc.2/mmc_host/mmc1/mm
c1:aaaa/block/mmcblk0' for mountable filesystems for '/sdcard'
I/vold    (   53): Aborting start of /sdcard (bootstrap = 1)
I/vold    (   53): Volmgr not ready to handle device
D/vold    (   53): Bootstrapping complete

I must say I am a little surprised because worst case I thought the phone would at least boot but the Bluetooth stuff simply would not work.
Alternatively I am missing something else due to all this being a little new for me and even though my update script runs fine something is still missing.

For the moment I am overwriting etc/bluez bin/bluetoothd and 3 files from lib/ plus the bluez-plugin directory

Anyone have any ideas I am all ears.

Thanks,
Serge


#2
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hmmmm, I am assuming the firmware for the BCM4329 is a different version as well, I might try with the Nexus version to see if this makes any difference.

Serge


#3
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Darn,

Still no luck with this!

Interestingly on my Desire there are calls to a /system/bin/btld which I assume is some sort of bluetooth process.
I cant find this file in the Nexus One, so the differences in the bluetooth implementation seems to be fairly substantial.

Serge


#4
F3d0r

F3d0r

    Newbie

  • Members
  • Pip
  • 2 posts
  • Devices:HTC Desire

View Postssozonoff, on Apr 30 2010, 15:51, said:

Darn,

Still no luck with this!

Interestingly on my Desire there are calls to a /system/bin/btld which I assume is some sort of bluetooth process.
I cant find this file in the Nexus One, so the differences in the bluetooth implementation seems to be fairly substantial.

Serge

I am also struggling with Bluetooth on my Desire. Hopefully there will be some progress on this topic in the near future.
After rooting - thank you Paul - at least the community has the chance to come up with fixes/improvements.

regards


#5
afiorillo

afiorillo

    Diehard

  • Members
  • PipPipPipPip
  • 449 posts
  • Location:Rome, IT
  • Devices:HTC Desire w/ MCR r9 WIP
  • Twitter:@afiorillo
Folks, I don't get the point with this: I use Bluetooth everyday for file transfer and audio streaming (to a Sony Ericsson A2DP headset), w/ media control and complete call management. It works without a flaw.


#6
xhemp

xhemp

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:UK
  • Devices:HTC Desire

View Postafiorillo, on May 6 2010, 14:54, said:

Folks, I don't get the point with this: I use Bluetooth everyday for file transfer and audio streaming (to a Sony Ericsson A2DP headset), w/ media control and complete call management. It works without a flaw.

+1 here.


#7
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hi,

afiorillo, on May 6 2010, 13:30, said:

Folks, I don't get the point with this: I use Bluetooth everyday for file transfer and audio streaming (to a Sony Ericsson A2DP headset), w/ media control and complete call management. It works without a flaw.

Yup but the SPP profile does not work fine :-(
i.e. connecting to a Serial Device.

Thanks,
Serge

Edited by ssozonoff, 06 May 2010 - 01:59 PM.


#8
afiorillo

afiorillo

    Diehard

  • Members
  • PipPipPipPip
  • 449 posts
  • Location:Rome, IT
  • Devices:HTC Desire w/ MCR r9 WIP
  • Twitter:@afiorillo

View Postssozonoff, on May 6 2010, 15:58, said:

Hi,
Yup but the SPP profile does not work fine :-(
i.e. connecting to a Serial Device.

Thanks,
Serge
OK, got it. So, just for curiosity, what kind of "serial" device are you trying to pair with the Desire? The only ones that pop up in my mind are the old days Bluetooth GPS antennas... :P


#9
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hi,

View Postafiorillo, on May 6 2010, 16:06, said:

OK, got it. So, just for curiosity, what kind of "serial" device are you trying to pair with the Desire? The only ones that pop up in my mind are the old days Bluetooth GPS antennas... :P

I am building a display and control panel for a radio control "Quadrocopter".  I use a Bluetooth adapter as a serial port bridge to a wireless radio which communicates with the Quadrocopter.

Sadly HTC did away with the Ext-USB connector which exposed a serial port so I have to go the Bluetooth route.

Serge


#10
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 32,872 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:Galaxy Nexus / TF Prime
  • Twitter:@paulobrien
Have you tried this on MCR r1? It has a newer Bluetooth stack.

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#11
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hi Paul,

View PostPaul, on May 6 2010, 17:20, said:

Have you tried this on MCR r1? It has a newer Bluetooth stack.

Nope, I was not aware of that. Will do so now and report back.

Thanks,
Serge


#12
ssozonoff

ssozonoff

    Newbie

  • Members
  • Pip
  • 14 posts
Hi Paul,

View Postssozonoff, on May 6 2010, 17:29, said:

Hi Paul,
Nope, I was not aware of that. Will do so now and report back.


If you dont mind me saying you are F&%*% Rock Star.

Works!!!

Thanks for that,
Serge


#13
F3d0r

F3d0r

    Newbie

  • Members
  • Pip
  • 2 posts
  • Devices:HTC Desire
I for one am having big problems pairing the Desire with the Parrot Minikit Slim (v1.27) handsfree unit. The unit works nicely with my various other Bluetooth phones (WinMobile, Nokia etc.) I have at hand but it's hardly possible to pair it with the desire.

Once paired, for calls initiated from the Desire the audio is not transferred to the handsfree. Incoming calls and calls started via the Parrot are working nicely so far.

regards

Edited by F3d0r, 06 May 2010 - 03:59 PM.


#14
h00pyfr00d

h00pyfr00d

    Regular

  • Members
  • PipPip
  • 127 posts
  • Gender:Male
  • Location:London

View PostPaul, on May 6 2010, 16:20, said:

Have you tried this on MCR r1? It has a newer Bluetooth stack.

P

I must say my bluetooth troubles have vanished since flashing the new MCR R1. My headset even has a crazy range. I was using it in the kitchen when my phone was at my desk, about 25m away through walls!

Machine, Heal Thyself

#15
ldti

ldti

    Newbie

  • Members
  • Pip
  • 3 posts
  • Devices:---
  • Twitter:@---

View PostF3d0r, on May 6 2010, 17:57, said:

I for one am having big problems pairing the Desire with the Parrot Minikit Slim (v1.27) handsfree unit. The unit works nicely with my various other Bluetooth phones (WinMobile, Nokia etc.) I have at hand but it's hardly possible to pair it with the desire.

Once paired, for calls initiated from the Desire the audio is not transferred to the handsfree. Incoming calls and calls started via the Parrot are working nicely so far.

regards

to pair the minislim , hold the central button while pressing green. this helped me to pair it. about the audio reroute , it's the same here. does snot bother me too much , but I'm pretty sure an app could be written to fix that.


#16
Peter G

Peter G

    Newbie

  • Members
  • Pip
  • 1 posts
Hi

Rooted my Desire and flashed the MCR r2 hoping to get Bluetooth SPP profile working for the same reason as Serge.
As far as I can see it's not :)

Is the same BT update done to MCR r2 as to r1?

Thought I should ask before downgrading to r1 just to try it out.

/Peter


#17
Fii

Fii

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:HTC Desire
Does the Bluetooth SPP now work with Froyo ROMs?


#18
dezmo

dezmo

    Regular

  • Members
  • PipPip
  • 70 posts
  • Location:Budapest
  • Devices:HTC Desire DeFroST 6.xx
I wouldn't mind too if SPP will work in Sense roms as well (I know AOSP does...) :D

Why shorting and displaying by Family name are not working properly in ANDROID?

#19
Cuba_Libre

Cuba_Libre

    Newbie

  • Members
  • Pip
  • 4 posts
Hello,
So far, SPP is still buggy with MCR8 and MCR9.

I love the Modaco's, but it's just working with non Sense roms (Like Cyanogen's).

I really hope that the working SPP profile in the MCR1 will come to life in the last MCR9, maybe one day !
It's my only grievance with this wonderfull rom  :lol:


#20
spammyspam

spammyspam

    Enthusiast

  • Members
  • PipPipPip
  • 235 posts
  • Devices:Desire
Have you noticed any performance/stability improvements in other BT profiles? Handsfree seems to not work very well in r8 either.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users