Bluetooth SPP not working on HTC Desire

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


Sponsored Links
 ello,

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
work.

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
mConnectThread
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 -
*************DiscoverServices********


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 -
*************DiscoverServices********
04-19 16:33:40.314: INFO/DTUN_HCID_BZ4(293):
dtun_client_get_remote_svc_channel: starting discovery on
(uuid16=0x0011)
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
DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4)
04-19 16:33:40.314: INFO/(260): DTUN_ReceiveCtrlMsg: [DTUN] Received
message [BTLIF_DTUN_METHOD_CALL] 4354
04-19 16:33:40.314: INFO/(260): handle_method_call:
handle_method_call :: received
DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134
04-19 16:33:40.314: ERROR/BTLD(260): ****************search UUID =
1101***********
04-19 16:33:40.314: INFO//system/bin/btld(256):
btapp_dm_GetRemoteServiceChannel()
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):
adapter_get_device(00:23:4D:F3:3B:BE)
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/
hci0/dev_00_23_4D_F3_3B_BE
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


 ello,
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
1.15.110.11. Can it be resolved by upgrading firmware. Please help me.

On Apr 19, 9:40pm, ssozonoff <se...@sozonoff.com> wrote:
>


Sponsored Links


Other Threads

1. "R cannot be resolved"

Im a  beginner in Android,When I run an application in ecllipse,an
error showing "R cant be resolved" How can i fix that error,thanks in
advance..

-- 

2. Using SD card image (windows)

Hey

I wanted to know what is the easiest way to use (copy files from/to)
SD card emulation file on Windows? On *nix i can mount it to some
directory. On Windows? I can use some tools like UltraISO but it's not
the same (it's a application, image is not working 'one the fly').

Any ideas?

-- 

3. Colors from bitmap

4. The default Android UI

5. Replace Android Default Home application with my application on runtime.

6. Is that compulsory to use Java developing android apps????

7. Audio hijack?