I am working on an Android Application that communicates with another
device via bluetooth.
It opens a Bluetooth Server Socket with
the well-known standard UUID for SPP communication:
(00001101-0000-1000-8000-00805F9B34FB).

But since the Android 2.2 update on my Archos Tablet this fails with
an exception,
saying that this UUID is reserved.

On a Milestone with Android 2.1 the same code works without problems.

Why is this UUID reserved?
In the Android Source I can see the Array of reserved UUIDs, but the
SPP ID
is not included.

see:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2.1_r1/android/bluetooth/BluetoothUuid.java#BluetoothUuid.0RESERVED_UUIDS


Does anybody know a workaround that would enable opening a bluetooth
socket with the given UUID?


The exception stacktrace from the log:
W/BluetoothService( 1290): Attempted to register a reserved UUID:
00001101-0000-1000-8000-00805f9b34fb
E/BluetoothService(20201): Socket listen() failed
E/BluetoothService(20201): java.io.IOException: Not able to register
SDP record for GlucoTel SPP
E/BluetoothService(20201):      at
android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord(BluetoothAdapter.java:
778)
E/BluetoothService(20201):      at com.bodytel.android.BluetoothService
$AcceptThread.<init>(BluetoothService.java:285)
E/BluetoothService(20201):      at
com.bodytel.android.BluetoothService.start(BluetoothService.java:156)
E/BluetoothService(20201):      at
com.bodytel.android.BodytelAndroidClient.onResume(BodytelAndroidClient.java:
246)
E/BluetoothService(20201):      at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1149)
E/BluetoothService(20201):      at
android.app.Activity.performResume(Activity.java:3823)
E/BluetoothService(20201):      at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
3118)
E/BluetoothService(20201):      at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
3143)
E/BluetoothService(20201):      at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2684)
E/BluetoothService(20201):      at android.app.ActivityThread.access
$2300(ActivityThread.java:125)
E/BluetoothService(20201):      at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:2033)
E/BluetoothService(20201):      at
android.os.Handler.dispatchMessage(Handler.java:99)
E/BluetoothService(20201):      at android.os.Looper.loop(Looper.java:123)
E/BluetoothService(20201):      at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/BluetoothService(20201):      at
java.lang.reflect.Method.invokeNative(Native Method)
E/BluetoothService(20201):      at
java.lang.reflect.Method.invoke(Method.java:521)
E/BluetoothService(20201):      at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/BluetoothService(20201):      at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/BluetoothService(20201):      at dalvik.system.NativeStart.main(Native
Method)


The Android Java Code Snippet we use to open the  bluetooth socket:

private static final String BT_NAME = "GlucoTel SPP";
private static final UUID BT_ID =
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
.....
BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothServerSocket socket =
mAdapter.listenUsingRfcommWithServiceRecord(BT_NAME,  BT_ID);
.....
socket = mmServerSocket.accept();

We have observed this issue on the following devices:

Test Device 1:
- Archos 32
- Firmware 2.1.8 (Android 2.2.1)
- Board Version: A32-V5

Test Device 2:
- Archos 101
- Firmware 2.0.54  (Android 2.2.1)
- Board Version A101IT-V6

Thanks for any ideas or feedback!

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

Reply via email to