Bluetooth SPP not working on HTC Desire

by ssozonoff » Tue, 20 Apr 2010 00:40:51 GMT

Sponsored Links

I have been doing some Bluetooth SPP development with an HTC Legend
which was working just fine.
Today I received my HTC Desire and I cant get an SPP connection to

The first thing I had to do is remove the mAdapter.cancelDiscovery()
call in the connectThread().
It seems there is some sort of timing issue here and with the faster
processor its not working like this.

Below is an extract from the logs when mAdapter.cancelDiscovery() was
being called just prior to mmSocket.connect();

04-19 16:30:58.984: DEBUG/BluetoothSppService(759): Running
04-19 16:30:58.984: ERROR/BluetoothEventLoop.cpp(92): pollData[0] is
revented, check next one
04-19 16:30:58.984: ERROR/BluetoothService.cpp(92):
stopDiscoveryNative: D-Bus error in StopDiscovery:
org.bluez.Error.Failed (Invalid discovery session)
04-19 16:30:59.024: DEBUG/DEVICE(293): BLTA -

I get a little farther after this change and it almost seems as if the
connection is up because the BT Icon on my laptop changes to green but
then the connection fails anyway.
Here is an extract of the stack after the call to mmSocket.connect();

04-19 16:33:40.314: DEBUG/DEVICE(293): BLTA -
04-19 16:33:40.314: INFO/DTUN_HCID_BZ4(293):
dtun_client_get_remote_svc_channel: starting discovery on
04-19 16:33:40.314: INFO/DTUN_HCID_BZ4(293): bdaddr=00:23:4D:F3:3B:BE
04-19 16:33:40.314: INFO/DTUN_CLNT(293): Client calling
04-19 16:33:40.314: INFO/(260): DTUN_ReceiveCtrlMsg: [DTUN] Received
04-19 16:33:40.314: INFO/(260): handle_method_call:
handle_method_call :: received
04-19 16:33:40.314: ERROR/BTLD(260): ****************search UUID =
04-19 16:33:40.314: INFO//system/bin/btld(256):
04-19 16:33:40.314: INFO//system/bin/btld(256): ##### USerial_Ioctl:
BT_Wake, 0x8003 ####
04-19 16:33:40.914: INFO//system/bin/btld(256): ##### USerial_Ioctl:
BT_Sleep, 0x8004 ####
04-19 16:33:41.394: WARN/BTLD(260): ccb timer ticks: 0
04-19 16:33:41.394: INFO//system/bin/btld(256): ##### USerial_Ioctl:
BT_Wake, 0x8003 ####
04-19 16:33:41.464: WARN/BTLD(260): info:x10
04-19 16:33:41.464: INFO/BTL-IFS(260): send_ctrl_msg: [BTL_IFS CTRL]
send BTLIF_DTUN_SIGNAL_EVT (CTRL) 10 pbytes (hdl 14)
04-19 16:33:41.464: DEBUG/DTUN_HCID_BZ4(293): dtun_dm_sig_link_up()
04-19 16:33:41.464: INFO/DTUN_HCID_BZ4(293): dtun_dm_sig_link_up:
dummy_handle = 260
04-19 16:33:41.464: DEBUG/ADAPTER(293):
04-19 16:33:41.464: ERROR/BluetoothEventLoop.cpp(92): pollData[0] is
revented, check next one
04-19 16:33:41.464: ERROR/BluetoothEventLoop.cpp(92): event_filter:
Received signal org.bluez.Device:PropertyChanged from /org/bluez/293/
04-19 16:33:41.584: WARN/BTLD(260): process_service_search_attr_rsp
04-19 16:33:41.624: INFO/BTL-IFS(260): send_ctrl_msg: [BTL_IFS CTRL]
send BTLIF_DTUN_SIGNAL_EVT (CTRL) 13 pbytes (hdl 14)
04-19 16:33:41.624: INFO/DTUN_HCID_BZ4(293):
dtun_dm_sig_rmt_service_channel: success=0, service=00000000
04-19 16:33:41.624: ERROR/DTUN_HCID_BZ4(293): discovery unsuccessful!
04-19 16:33:42.126: INFO//system/bin/btld(256): ##### USerial_Ioctl:
BT_Sleep, 0x8004 ####
04-19 16:33:42.724: INFO//system/bi

Bluetooth SPP not working on HTC Desire

by atlee » Fri, 28 May 2010 03:52:14 GMT

i have android application which connects to the paired bluetooth
device. I have tested it on motorola milestone it works fine. But
while testing it on HTC desire i couldn't connect to the paired
bluetooth device. It gives me discovery failed when i checked log then
i found the UUID(0000112D-0000-1000-8000-00805F9B34FB ) which i pass
get changed. The sniffer log which i got is 0x2d, 0x11, 0x11, 0x2d,
0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34,
0xfb. I have tried various UUID but problem not resolved. Is it a
firmware problem of HTC desire. My HTC desire firmware build number is Can it be resolved by upgrading firmware. Please help me.

On Apr 19, 9:40pm, ssozonoff <> wrote:

Sponsored Links

Other Threads

1. Licensing and Trial Software, the starts of a solution?

This might be useful to some of you looking for a solution to the 
Trial/Pay-for dilemma;

I've just made available some code at which 
will allow you to create a license file which is a set of encrypted 
properties on one machine (such as a web server), and decrypt it on an 
Android device.

It's not an all-singing all-dancing licensing solution, but what it will 
do is allow you to write your apps in a way where they can ask the user 
for a license file, store the encrypted license, and then enable or 
disable functionality based whether the license exists and what 
properties it contains.

Anyway, hope it's useful.


Al Sutton



2. URL For the Android Application Marketplace

Hi Fellow Android Developers-

I was wondering if anyone has the URL our the site information from
where the G1 gets is available android applications to download?

I would love to see the rankings as I dont have a G1 phone yet.



3. Announce Bookworm Android

4. HostnameVerifier for HttpsURLConnection does not work

5. Any idea about which will be the next Android Powered Phone on the market?

6. Question for Android Developers

7. Ashwin's Idea: Vonage App