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.

CC2640: Queries on Bluetooth Stack

Part Number: CC2640
Other Parts Discussed in Thread: BLE-STACK

I have following queries on BLE.

1. How to configure GATT server initialization and GATT Add service and  Add Characteristic with 128 Bit UUID using HCI commands?

2. How to set Fixed Passkey and enable this option on Added characteristic in point 1, so that on first time read/Write on Characteristic will popup the passkey option on host. (Authenticated read write) ?

3. How to configure so that there is Event to host with Rx data length   on Attribute modification (Attribute write for Rx UUID )  each time?

4. How to use Software cmd to go in boot mode, as it replying error and Also I need Host interface for bootloader?

  • Hi Lalit,

    1. I believe you are looking for the descriptions of the GATT_AddService and GATT_AddAttribute. You will find the API documentation for HostTest in your default installer path: docs/ble5stack/vendor_specific_guide/BLE_Vendor_Specific_HCI_Guide/

    2. This can be done by configuring permissions parameter of the GATT_AddAttribute call.

    3. I am not sure I understand, dynamic length on characteristics is not really possible. The entire characteristic data allocation will be passed to the host.

    4. There is no SW command to enter the ROM bootloader. Are you using the flash based bootloader?
  • 1. GATT_AddService and GATT_AddAttribute Does not support 128 bit UUID.

    2. OK, but again for 16 bit UUID not for 128 bit UUID.

    3. I am asking for Attribute Modification Event with Attribute Handle, Attribute Data length & data pointer

    4. What is the use of UTIL_ForceBoot command, if this command not works than how to go to boot mode , I need all control thru Host and avoid any HW control for same.
  • Hi Lalit,

    I believe you might be misunderstanding the functionality of GATT_DB_OFF_CHIP functionality. The whole purpose of storing the GATT Services off-chip is that you never tell HostTest about the details at init (no storage of UUIDs on-chip). The service declaration characteristic has UUID of 0x2800, but the value of that characteristic contains the UUID of the service which can be 16 or 128 bits. If you would like to initialize a service with 128 bit UUID, then add a characteristic with UUID of 0x2800 and value of your new service's UUID.

    So when the application initializes HostTest, it never tells any details around UUIDs and such. That happens at run time during service discovery. When ATT comes through the BLE-Stack, the application have to handle the discovery and parsing the data in the application, and respond appropriately.

    So to summarize: All GATT functionality is hosted on the application side, by being able to parse and respond to ATT packets. Is this clear?