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.

Services and characteritics definition using HCI interface (CC2540)

Hi,

As a first step, I am trying to define a complete service just like the one described in the Developer's Guide, but using the HCI interface.

I'm trying to use the GATT_AddService() and GATT_AddAttribute() interfaces (respectively 0xFDFC and 0xFDFE).

Now I don't see what other interface I can use to set the characteristic's default value?

Cheers,

Jean

  • I believe I'm having the exact same problem. I'm implementing the GATT database off-chip, so I need to instantiate services using the HCI interface. I understand that a service must be instantiated as either a primary (0x2800) or secondary (0x2801) service, but beyond that, we have to know what type of service it is--that's stored in the value of the service. For example, the GAP Service has a UUID of 0x1800--I want to add this service, so I do a GATT_AddService(), but my only parameters are the Primary/Secondary Service choice, and the number of attributes. I need to be able to also define what type of service I am creating. Where do I give the information 0x1800 to the service?

    There has got to be a way to instantiate a service that is a "Device Information Service" or a "GAP Service". I can't find any way to create a useful Attribute Table over a Host Controller Interface--all I seem to be able to do is create a bunch of primary services without them having a useful UUID.

    Thanks

    Miles

  • Hi,

    I just recently implemented this sort of functionality and my finding was that when use GATTDB_OFFCHIP configuration:

    - You have to use GATT_AddService and GATT_AddCharacteristic to provide a "skeleton" handles to chip (actual handle values are not involved) 

    - This skeleton is used by TI stack to determine if the incoming ATT calls are even remotely valid (for instance, correct handle)

    - If the stack decides the ATT request is valid it is forwarded to via HCI to host application.

    Basically you need to able to handle number of ATT requests at you application and have a capability to send responses to them. Some examples of these requests are ATT_FindByTypeValueReq, ATT_ReadByTypeReq and ATT_ReadByGrpTypeReq.

    Overall it a quite bit of work to implement. It needs a lot of experimenting as the documentation is lacking in detail.

    /Jani