I've been fighting this for a long time now and thought I'd ask the
group.

I have a Samsung Galaxy S running 2.2. I am trying to connect to a
Bluetooth device (Free2move dongle).

I can get up to the point where I do the
createRfcommSocketToServiceRecord  and then I get Service Discovery
Failed.

Here is what my app (VERY closely based on BluetoothChat) is telling
me:

09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Paired device
found: Free2move WU
09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Found Free2move
device: 00:0B:CE:03:35:49
09-07 23:41:16.644: DEBUG/BluetoothChatService(11472): Will try to
connect to: 00:0B:CE:03:35:49
09-07 23:41:28.637: DEBUG/BluetoothChatService(11472): BluetoothSocket
created for device: Free2move WU
09-07 23:41:28.641: INFO/BluetoothChatService(11472): BEGIN
ConnectThread
09-07 23:41:28.656: INFO/BluetoothChatService(11472): Using socket to
connect now...
09-07 23:41:30.621: DEBUG/BluetoothChatService(11472): setState()
STATE_NONE -> STATE_CONNECTING
09-07 23:41:34.695: ERROR/BluetoothChatService(11472): Connection
failed
09-07 23:41:34.711: DEBUG/BluetoothChatService(11472): setState()
STATE_CONNECTING -> STATE_LISTEN
09-07 23:41:34.730: WARN/BluetoothChatService(11472): Connection
failed with exception: Service discovery failed
09-07 23:41:34.730: WARN/BluetoothChatService(11472): With cause:
class java.io.IOException
09-07 23:41:34.742: WARN/BluetoothChatService(11472):
android.bluetooth.BluetoothSocket$SdpHelper.doSdp: 377
09-07 23:41:34.742: WARN/BluetoothChatService(11472):
android.bluetooth.BluetoothSocket.connect: 201
09-07 23:41:34.762: WARN/BluetoothChatService(11472):
com.standardandroid.speedpro.bluetooth.BluetoothChatService
$ConnectThread.run: 569


The code that dies looks like this:

private class ConnectThread extends Thread
        {
                private final BluetoothSocket mmSocket;
                private final BluetoothDevice mmDevice;

                public ConnectThread(BluetoothDevice device)
                {
                        mmDevice = device;
                        BluetoothSocket tmp = null;

                        // Get a BluetoothSocket for a connection with the
                        // given BluetoothDevice
                        try
                        {

                                tmp = 
device.createRfcommSocketToServiceRecord(MY_UUID);


I've seen some reports that this might be a bug in Android itself:
http://groups.google.com/group/android-platform/browse_thread/thread/de8310a904f2028e

Does anyone know? Android folks?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to