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.

LAUNCHXL-CC26X2R1: Need to exclude few characteristics from GAP Service

Part Number: LAUNCHXL-CC26X2R1

Hi,

I have LAUNCHXL-CC26X2R1 boards with CCS v9.1.0 and I am using the simplelink_cc13x2_26x2_sdk_3_10_01_11 SDK for project.

I am working on the Simple Peripheral application and have modified the project so it can only supports GAP GATT Service (service uuid - 1800) . I am using GAP GATT Service which is implemented by the TI BLE Stack.

But in GAP GATT Service, I need to exclude few characteristics and I am not able to find the source file where we Register the GAP GATT Service, to add all the characteristics for that service (i.e. like we use GATTServApp_RegisterService() to add characteristics in custom services). 

So, right now I have used GGS_AddService(GATT_ALL_SERVICES) to add the GAP GATT Service which is implemented by the TI BLE Stack and following characteristics is added:

And according to the BLE Spec (see BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part C, §12) for LE peripheral, "Device Name" and "Appearance" is only mandatory characteristics that needs to be implemented. So, In my application I need to remove other characteristics from GAP GATT Service.

Can you please explain how can I achieve that? Or do I have to create GAP service separately for my requirement and not include TI specific implementation for the GAP GATT Service?

Let me know if I need to elaborate anything.

Regards,
Shiv

  • I suppose you can revise simple_gatt_profile.c and simple_gatt_profile.h to achieve this.

  • Hi,

    Just for clarification.

    So, To achieve my requirement I have to revise the simple_gatt_profile.c and simple_gatt_profile.h OR I can create a new service files for GAP Service (Service UUID - 1800). And I should not add the GAP GATT Service provided by TI (i.e. removing GGS_AddService() from initialization).

    Is it correct understanding?

    Regards,
    Shiv 

  • If you intend to exclude few characteristics, I suppose you can revise simple_gatt_profile.c and simple_gatt_profile.h to exclude related characteristics.

  • YiKai Chen said:

    If you intend to exclude few characteristics, I suppose you can revise simple_gatt_profile.c and simple_gatt_profile.h to exclude related characteristics.

    simple_gatt_profile.c/simple_gatt_profile.h consists Simple Profile Service not GAP Service. I want to exclude few characteristics in GAP Service not in the Simple Profile Service.
    So, In a way I need to implement GAP service characteristics in simple_gatt_profile.c/simple_gatt_profile.h to utilize it and remove GAP GATT Service provided by TI (i.e. removing GGS_AddService() from initialization and use SimpleProfile_AddService((uint32)GATT_ALL_SERVICES)).
    Is it correct or I am missing something? Let me know.
    Regards,
    Shiv
  • Gentle Reminder.

    Regards,
    Shiv

  • I am confused by your descriptions. You mentioned "I want to exclude few characteristics in GAP Service not in the Simple Profile Service." What do you exactly mean to exclude?

  • I mean I want to remove Attribute with UUID 0x2AA6 and 0x2AC9 from the GAP GATT Service (Service UUID - 0x1800). As you can refer to my screen snip in original post, in current implementation of TI provided GAP GATT Services has attributes with UUID 0x2A00, 0x2A01, 0x2A04, 0x2AA6 and 0x2AC9.

    And according to the BLE Spec (see BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part C, §12) for LE peripheral, "Device Name" and "Appearance" is only mandatory characteristics that needs to be implemented. So, In my application I want to remove Attribute with UUID 0x2AA6 and 0x2AC9 from the GAP GATT Service (Service UUID - 0x1800).

    To achieve this you mention "to revise simple_gatt_profile.c and simple_gatt_profile.h to exclude related characteristics". But simple_gatt_profile.c and simple_gatt_profile.h implement Simple GATT Profile Service (UUID - 0xFFFF) not the GAP GATT Service (Service UUID - 0x1800).

    I have already look into the gapgattserver.h where GAP GATT Service API are provided, to find if there is any function provided to achieve this but there wasn't. 

    So, Is there any way to remove Attribute with UUID 0x2AA6 and 0x2AC9 from the GAP GATT Service (Service UUID - 0x1800)? 

    Regards,
    Shiv

  • If you remove the line "GGS_AddService(GATT_ALL_SERVICES);" in SimplePeripheral_init, you can exclude the following uuids. But I am not sure if this is what you intend to achieve.

    #define DEVICE_NAME_UUID                           0x2A00 // Device Name
    #define APPEARANCE_UUID                            0x2A01 // Appearance
    #define RECONNECT_ADDR_UUID                        0x2A03 // Reconnection Address
    #define PERI_CONN_PARAM_UUID                       0x2A04 // Peripheral Preferred Connection Parameters
    #define SERVICE_CHANGED_UUID                       0x2A05 // Service Changed
    #define CENTRAL_ADDRESS_RESOLUTION_UUID            0x2AA6 // Central Address Resolution
    #define RESOLVABLE_PRIVATE_ADDRESS_ONLY_UUID       0x2AC9 // Resolvable Private Address Only

  • No, I want to use GAP GATT Service (UUID - 0x1800). But I dont intended to use attribute with UUID 0x2AA6 and 0x2AC9. So, I want to remove Attribute with UUID 0x2AA6 and 0x2AC9 from the GAP GATT Service (Service UUID - 0x1800).

    If I include TI provided GAP GATT Service then it seems all the characteristics is mandatory to implement where as according BLE spec (see BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part C, §12), "Device Name" and "Appearance" is only mandatory characteristics. Do you know why TI has made all those characteristics mandatory?

    Do you know how can I meet my requirement with TI provided GAP GATT Service? Or I have to implement my own GAP Service to meet my requirement?

    Regards,
    Shiv

  • For attributes with UUID 0x2AA6 and 0x2AC9, spec mentions "Optional if Link Layer privacy is supported, otherwise excluded" and I suppose TI implements for Link Layer privacy use case. I don't know how to exclude only those two attributes. Hope someone from TI would jump in to answer this for you.

  • Hello Shiv,

    Apologize for the delayed response, as team availability has been limited the past few weeks.

    I looked into the BLE Stack to see if it was possible to exclude the optional characteristics in the GAP GATT Service. Unfortunately, TI's implementation does not allow you to selectively enable/disable the optional characteristics when you register the service. I think you would have to implement the service yourself if you are required to exclude non-mandatory characteristics.

    Regards,
    Michael

  • Sounds a good alternative to exclude all those service without register it and only implement those you needed by yourself.