I have two text books that cover Bluetooth and have read multiple articles and not one has mentioned the need to do that.
What I read in the documentation is that the UUID is random: "A Universally Unique Identifier (UUID) is a standardized 128-bit format for a string ID used to uniquely identify information. The point of a UUID is that it's big enough that you can select any random and it won't clash. In this case, it's used to uniquely identify your application's Bluetooth service. To get a UUID to use with your application, you can use one of the many random UUID generators on the web, then initialize a UUID with fromString(String)." Are you saying that there is some sort of table that exists that specifies my exact device? On Sep 8, 10:45 pm, gjs <[email protected]> wrote: > Hi, > > Are you sure you are using the correct UUID value for your device ? > > The default UUID in bluetoothchat usually needs to be changed, see the > Android bluetooth docs. > > Regards > > On Sep 8, 2:45 pm, darrinps <[email protected]> wrote: > > > > > > > > > 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/... > > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

