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.

UUIDs for Service and Characteristic

Other Parts Discussed in Thread: CC2540

Now that I have my prototype board programmed and running (a modified version of simpleBLEPeripheral) I need to connect to an iPhone5 app that our contracted developer has.  The app is installed on my iPhone5 and runs to the point of trying to connect and send time to my board.  The developer tells me to set my Service UUID to 6B3B68E6-E4E3-4F87-81DB-9DC1D62C9E18 and the UUID for my "set time" characteristic to B9F80190-321F-499E-9B1E-242DBA4EF067.  Where and how do I put these UUIDs into my CC2540 modified simpleBLEPeripheral code?  Searching through the source code and documentation shows nothing with numbers this large.  Please help.

  • The standard simpleBLEPeripheral uses only 16bit UUIDs which are ok for development but are reserved for specific functions. For manufacturer specific services, 128 bit UUIDs are required. See this resource:

    http://processors.wiki.ti.com/index.php/128_Bit_UUID_SimpleBLE

  • Eng351     Thank you for the answer and link.  I have created copies of the Central and Peripheral projects, renaming to have a leading 128_ to keep them separate from the unmodified originals.  Not working quite yet.  I have debugged down to simpleBLECentralStartDiscovery() where:

    uint8 uuid[ATT_UUID_SIZE] = { TI_UUID(SIMPLEPROFILE_SERV_UUID) };

    results in uuid[] being loaded with 00:00:00:00:00:00:00:B0:00:40:51:04:F0:FF:00:F0.   This is not what is in the macro definition for TI_UUID(SIMPLEPROFILE_SERV_UUID).  It seems the initialization of uuid is getting corrupted.  Am I missing something?

  • Think I found it!  I changed the TI_UUID definition as shown

    //#define TI_UUID(uuid)       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0,0x00, 0x40, 0x51, 0x04, LO_UINT16(uuid), HI_UINT16(uuid), 0x00, 0xF0
    #define TI_UUID(uuid)       LO_UINT16(uuid), HI_UINT16(uuid), 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0,0x00, 0x40, 0x51, 0x04, 0x00, 0x00, 0x00, 0xF0

    and now I get the proper "Char 1: n" at the Peripheral.

    Now the question becomes, what about the characteristic uuid?  The iPhone developer gave me two 128-bit VERY different uuids.

  • The UUIDs can be whatever you want. The TI base UUID is just an example but you can use your own base.

  • But can the uuid for services be completely different from the uuid for a characteristic?

  • Please mark this URGENT:

    Proceeding on, I have the Peripheral side working with 128-bit Service UUID and 16-bit Characteristic UUID.  Working is defined here as using BTOOL to connect to the peripheral, discover its 128-bit Service UUID, then write and read Characteristic 1 using UUID F1:FF.  However, I have not been successful in getting the Central side program to do more than connect.  It fails to discover the peripheral.  What needs to be changed on the central side to make it discover a 128-bit service UUID and 16-bit characteristic UUIDs?