UUID Conflict in Bluetooth Connection Between Android and Tizen

Original Created Mar 21, 2017 | Regeneration Apr 22, 2026

I'm developing a Bluetooth application for both Android and Tizen (Gear) devices. My application can only establish a connection when using the UUID 00001101-0000-1000-8000-00805F9B34FB (SerialPortServiceClass_UUID) on both platforms. Other UUIDs fail to connect.

My concerns are:

  1. If other applications use the same UUID, could this cause conflicts similar to port conflicts in TCP/IP?
  2. How should I determine which UUID to use for my Bluetooth application?
  3. My application only needs to transfer basic data (similar to a chat application), without using radio, health info, or special services.

Problem Understanding

The issue involves Bluetooth RFCOMM socket connection between Android and Tizen devices, specifically regarding UUID selection and potential conflicts.

Solution Methods

  1. Using Standard UUID:

    • The UUID 00001101-0000-1000-8000-00805F9B34FB is widely accepted as the standard for serial port profile (SPP) connections.
    • This UUID works reliably across platforms, which explains why it's the only one working in your case.
  2. Generating Custom UUID:

    • While you can generate your own UUID, it must be identical on both client and server sides.
    • Custom UUIDs may not work with all Bluetooth stacks, which is why the standard UUID is recommended for basic data transfer.
  3. Conflict Resolution:

    • UUID conflicts are unlikely to cause issues like TCP/IP port conflicts.
    • Bluetooth connections are established between specific device pairs, so multiple applications using the same UUID won't interfere with each other's connections.

Code Examples

Server Side (Tizen):

const char* my_uuid = "00001101-0000-1000-8000-00805F9B34FB";
int server_socket_fd = -1;
bt_error_e ret;

ret = bt_socket_create_rfcomm(my_uuid, &server_socket_fd);
if (ret != BT_ERROR_NONE) {
    dlog_print(DLOG_ERROR, LOG_TAG, "bt_socket_create_rfcomm() failed.");
}

Client Side (Android):

// Using the same UUID as the server
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
BluetoothSocket socket = device.createRfcommSocketToServiceRecord(uuid);
socket.connect();

Additional Tips

  • For basic data transfer applications, sticking with the standard SPP UUID is recommended.
  • If you need to implement specific services, consider registering your own UUID with the Bluetooth SIG.
  • Always ensure the same UUID is used on both connecting devices.
  • For more information on Bluetooth development in Tizen, refer to the Samsung Tizen OS documentation.

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.