cdlugatiman / backport-android-bluetooth

Automatically exported from code.google.com/p/backport-android-bluetooth
0 stars 0 forks source link

Unable to start Service Discovery - Droid Eris #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Trying to connect socket using UUID for UUIDHelper.RFCOMM_PROTOCOL_UUID
and UUIDHelper.SERIAL_PORT_PROTOCOL_UUID and giving this exception
2- On debugging found that below line is returning value as false;

  mService.getRemoteServiceChannel(mDevice.getAddress(), uuid16, this);
in class BluetoothSocket$SdpHelper

What is the expected output? What do you see instead?
It should get connected properly to the already paired device but not
connecting. Stack trace is like 

03-18 16:55:12.334: ERROR/ConnectionThread(5544): java.io.IOException:
Unable to start Service Discovery
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
backport.android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:
289)
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
backport.android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:143)
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
.bluetoothtest.own.ConnectionThread.run(ConnectionThread.java:28)

What version of the product are you using? On what operating system?
Device- HTC DROID eris
Kernel Version 2.6.27-c77ff39d
Model Number ADR6200
Build Number- 1.17.605.1 CL104882 release-keys
Software version- 1.17.605.1
Hardware version- 0002
Android OS- 1.5 
Machine OS-Windows 7

Please provide any additional information below.
I am able to get the address and name of the devices available in range but
never able to connect to BluetoothSocket.

Can anyone help me to get solution or workaround of this?

Vishal 

Original issue reported on code.google.com by k.vishal...@gmail.com on 18 Mar 2010 at 11:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello!
I have the same problem!

Could anyone tell me how to connect???
Discovery is no problem, but how do i connect? I can't find anything about 
that, and
I'm trying that now for more than 2 weeks!!

Just a short describtion would be enough, or only a small sample where a socket 
is
created and connected without threads or anything like that... please help 
me... I
really need this!

Original comment by philip.p...@gmail.com on 9 Apr 2010 at 2:15

GoogleCodeExporter commented 9 years ago
I got the same problem using the official android 2.1 API  on a Samsung Galaxy 
Spica
I5700 device. I described my problem here [1]. This seems to depend on the 
underlying
implmentation of bluez or something in the kernel. I wanted to try to establish 
the
connection using the NDK but I'm missing the nescecarry skills. So if some crack
could try this, I think many people would be very happy.

Greets 

philDev

[1]
http://stackoverflow.com/questions/2519449/spp-socket-createrfcommsockettoservic
erecord-will-not-connect

Original comment by philippt...@gmail.com on 9 Apr 2010 at 4:06

GoogleCodeExporter commented 9 years ago
Same here as philippe. Please help us.

greets

Jon

Original comment by schnitze...@gmail.com on 22 Jul 2010 at 8:57

GoogleCodeExporter commented 9 years ago
Seeing this problem on an HTC Desire 2.2 Froyo

Original comment by jimth...@gmail.com on 7 Nov 2010 at 10:08

GoogleCodeExporter commented 9 years ago
HTC Desire 2.2 too!

Original comment by Jess...@gmail.com on 30 Nov 2010 at 9:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There is apparently a bug in the createRFcommSocketToServiceRecord() method, as 
a poster at StackOverflow noted:

http://stackoverflow.com/questions/4444235/problems-connecting-with-bluetooth-an
droid

I tried out the suggested work around and now connection finally works for me 
on my HTC Droid Incredible.

Original comment by yunchens...@gmail.com on 20 Jan 2011 at 1:16