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.

CC1350: How to define a BLE service characteristic with several fields

Part Number: CC1350

Hi everyone,

I am new to the Bluetooth word and I am trying to develop a BLE application using the TI BLE stack and the CC1350.

Starting from the dual image concept example, I am using the sub1packet custom service to send some data, and now I added a new service with 2 characteristics. Everything it's working quite good.

Now, my characteristic has several value fields, under a unique UUID (I am trying to follow the GATT specification by Bluetooth site).

How can I define more values for a single characteristic?

This is my actual service declaration:

static gattAttribute_t sub1packetServiceAttrTbl[] =
{
  // sub1packetService Service Declaration
  {
    { ATT_BT_UUID_SIZE, primaryServiceUUID },
    GATT_PERMIT_READ,
    0,
    (uint8_t *)&sub1packetServiceDecl
  },
    // Sub1packet Characteristic Declaration
    {
      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,
      0,
      &sub1packetService_Sub1packetProps
    },
      // Sub1packet Characteristic Value
      {
        { ATT_BT_UUID_SIZE, sub1packetService_Sub1packetUUID },
        GATT_PERMIT_READ,// | GATT_PERMIT_WRITE,
        0,
        sub1packet
      },
		  // Sub1packet User Description
		  {
			{ ATT_BT_UUID_SIZE, charUserDescUUID },
			GATT_PERMIT_READ,
			0,
			sub1packetService_UserDesc
		  },
};

 

  • Hi Arianna,

    Have you gone through the simplelink academy training on profiles and services? It explains nicely how they work and how to make your own.

    In summary though, your actual characteristic value char is the one that holds the data, the other characteristics are used for establishing the GATT table hierarchy. You store your data in sub1packet variable, if you require packing more data, you can change the data type. You will not hit a limit on this until you exceed your MTU size, in which case you will need to use blob operations.
  • Hi Sean,

    glad to hear you again!

    Sean2 said:
    Have you gone through the simplelink academy training on profiles and services? It explains nicely how they work and how to make your own.

    Where I can find it?

    Sean2 said:
    you can change the data type

    I want to do that.

    Thank you

    Arianna

  • Hi Arianna,

    You can find SimpleLink Academy for R1 devices here:

    The labs are focused on CC26xx, but the content should apply to CC1350 as well.

    The lab should discuss how to send data over GATT, let us know if you have any questions after working through the training.