4

I've been searching for days for the answer to this question.

I'm writing an Android app to interface with a Bluetooth Low Energy device. I have the device's 128-bit Service ID UUID, and several 16-bit Characteristic IDs. How do I handle these 16-bit values in software? Am I supposed to extend them to 128 bits by combining them with the default BLE UUID of 0000SSSS-0000-1000-8000-00805F9B34FB(where the 'SSSS' is the 16-bit characteristic ID value)? If not that, what?

I can't find any documentation on this, and I can't figure it out by looking at the sample app provided with the RxAndroidBle library that I'm trying to use.

Note this is a unique device and I'm not concerned with compatibility with other devices of its type, because there aren't any.

Robert Lewis
  • 1,847
  • 2
  • 18
  • 43

1 Answers1

1

You should create a full 128-bit UUID of your 16-bit shortened UUID.

For instance a Weight Characteristic has a 16-bit UUID of 2A9D which corresponds to UUID.fromString("00002A9D-0000-1000-8000-00805F9B34FB").

Dariusz Seweryn
  • 3,212
  • 2
  • 14
  • 21