This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

128bit example

I'm just trying out the 128-bit UUID example on the TI Wiki - however it appears to be missing the TI_BASE_128BIT_UUID definition. I assume this definition defines the other 112bits that makes up a complete 128-bit version of a 16-bit address.

Such as: uint8 uuid[ATT_UUID_SIZE] = { LO_UINT16(SIMPLEPROFILE_SERV_UUID), 

HI_UINT16(SIMPLEPROFILE_SERV_UUID),TI_BASE_128BIT_UUID};

What should TI_BASE_128BIT_UUID be equal too?

Cheers,

Si.

  • Hi Simon,

    This is a define that can be anything you want that is 128 bits long. TI uses F0000000-0451-4000-B000-00000000. I'm not sure why this is not included in the example, but you can define it however you wish. There may be some scheme to assigning these, but as far as I know the one in the example was made at random. Read more at http://en.wikipedia.org/wiki/Universally_unique_identifier.

    For example:
    #define TI_BASE_128BIT_UUID 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x40, 0x51, 0x04, 0x00, 0x00, 0x00, 0xf0

    Best regards,
    Aslak 

  • Thanks for the reply.

    I thought the 128bit base UUID definition was to define that the other 16bit part was a SIG defined UUID?

    I.e. So if your assigning a characteristic UUID as a 128-bit, it was made up by a 112bit base section, then the 16bit SIG UUID at the end?

    Simon.

  • Hi,

    Yes, of course, I mistyped. If you look at the define in the example it is 112 bits.

    However, for SIG defined UUIDs you only need 16 bits UUID total. In fact this is how they are defined. (http://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx)

    Proprietary UUIDs, i.e. for profiles that you yourself invent have to be 128 bits in total in a product that you want the bluetooth smart logo on.

    Aslak

  • Using the SIG battery service UUID as an example:

    #define BATTERY_SERV_UUID  0x180F

    #define TI_BASE_128BIT_UUID  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

    CONST uint8 BatteryServiceUUID[ATT_UUID_SIZE] = { LO_UINT16(BATTERY_SERV_UUID), HI_UINT16(BATTERY_SERV_UUID),TI_BASE_128BIT_UUID};

    is equal to:

    CONST uint8 BatteryServiceUUID[ATT_BT_UUID_SIZE] = { LO_UINT16(BATTERY_SERV_UUID), HI_UINT16(BATTERY_SERV_UUID) };

    ??

    Simon.

  • Hi Simon,

    Sorry for confusing you.

    SIG UUIDs are not 128bit, so they are not made up of 112bits proprietary UUID and 16 bits SIG UUID. Instead they are simply 16bit SIG UUIDs. The examples do not need to be modified for these.

    However, if you make your own profile with your own UUID, this must be - with our example implementation from the wiki- 112 bits static part that you define, which will hopefully separate your profiles/services from others, and the last 16 bits which will vary between different profiles that you make.

    Examples of proprietary services that are not and will likely never be adopted by SIG are our accelerometer service in the keyfobdemo and the simplekeys profile.

    Aslak