Android - SPP UUID for Nexus One running Android 2.3.6

1.2k views Asked by At

I'm querying the Nexus One for UUIDs using the getUuids() call from my Android App and I'm seeing the following being returned:

 0 th UUID found is 00001105-0000-1000-8000-00805f9b34fb
 1 th UUID found is 00001106-0000-1000-8000-00805f9b34fb
 2 th UUID found is 0000110a-0000-1000-8000-00805f9b34fb
 3 th UUID found is 0000110c-0000-1000-8000-00805f9b34fb
 4 th UUID found is 00001112-0000-1000-8000-00805f9b34fb
 5 th UUID found is 0000111f-0000-1000-8000-00805f9b34fb
 6 th UUID found is 0000112f-0000-1000-8000-00805f9b34fb
 7 th UUID found is 00001200-0000-1000-8000-00805f9b34fb

My question is: Why am I not able to see the standard UUID for SPP (00001101-0000-1000-8000-00805f9b34fb) in this list?

I have tested that I'm able to send serial data from an android device(Xoom) to this Nexus One phone using the S2 Bluetooth Terminal app. What UUID is being used in this data transfer?

1

There are 1 answers

5
Code Painters On

The S2 Bluetooth Terminal application uses 00001101-0000-1000-8000-00805F9B34FB hardcoded (checked with smali).

Mind the following:

  • looking at the docs for getUuids() I've noticed that:

    This method does not start a service discovery procedure to retrieve the UUIDs from the remote device. Instead, the local cached copy of the service UUIDs are returned. Use fetchUuidsWithSdp() if fresh UUIDs are desired.

    Have you tried fetchUuidsWithSdp()?

  • S2 Bluetooth Terminal, while useful, is not really a tool for SDP debugging. Personally, I'd rather try using BlueZ utilities (or something similar, if on Windows - yet I'd recommend Linux here) to see what services are actually advertised by the device. This way you'd be able to (at least) narrow down the problem to one of the devices.

    Edit: on Windows you can use Bluetooth Network Scanner

Here's a small sample of how can you scan the services with BlueZ tools (GPS receiver used for this sample):

czajnik@lapcio:~$ hcitool scan
Scanning ...
    00:1C:88:11:0E:CC   PENTA-GPS
czajnik@lapcio:~$ sdptool  browse 00:1C:88:11:0E:CC
Browsing 00:1C:88:11:0E:CC ...
Service Name: SPP Slave
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100