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.

CC2640R2F: BLE 128 bit UUID implementation

Part Number: CC2640R2F

Regarding the simple peripheral example project, the UUID's for the characteristics are specified as 16 bit quantities in the attribute table  and 128 bit UUIDs are generated from those. The  table of type gattAttribute_t can be populated with 16 bit or 128 bit UUIDs according to the documentation. Where is the BLE default 128 bit template specified at that is used to expand the 16 bit values? I found a reference to use of a compiler option "USE_128_BIT_UUID" and an example of a TI generated 128 bit UUID #define template in bcomdef.h but would like to understand the recommended best practice for specifying the 128 bit values. Thank you.

  • Hi David,

    In general the stack supports both 128 and 16 but uuids. As you have noticed the structure for an attribute supports both.
    If you wish to use only the 16 bit alias you need to reserve this from the SIG

    However for 128 bit UUIDs, you are free to use whatever you would like. There are several free UUID generators out there.
    The only caveat is that it cannot conflict with the BluetoothBaseUUID specified by the SIG.

    TI has a macro, called TI_BASE_UUID converts a 16 bit alias to a 128 bit UUID.

    For more information on building services I recommend seeing the custom service SimpleLink academy lab.