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.

CC2640R2F: GATT_ClientCharCfgUpdated is never sent when requesting for notifications

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

Tool/software:

Hi,

I'm working in a project where we are about to finish our move from using CC2640 and BLE-Stack 2.2.4 to instead use CC2640R2 and the 5.30 SDK. For both MCUs, our application is based on the host_test example app. What we've done for CC2640R2 is to start fresh from the host_test example app provided in the 5.30 SDK (using blestack, not ble5stack) and then port our custom logic on top of the example app. Our CC2640R2 acts as a modem, passing HCI commands back and forth to another MCU (our main) over SPI.

Our problem is that when we enable notifications for one of our characteristics, we can see from sniffing that the GATT client (a phone) and GATT server (modem) correctly performs a write request/response sequence to enable notifications, but we're never getting the GATT_ClientCharCfgUpdated event over HCI from the modem. We have also been able to confirm that notifications are enabled, as the client correctly receives values if we post to our characteristic from the main MCU.

Is there some additional config of the stack and/or app on the modem for this event to be sent or is it by default enabled for any characteristic? Our services and characteristics are registered at run time using HCI and is done the same way for CC2640R2 as we did for CC2640, where we indeed get this HCI event.

I wouldn't mind providing sniffer captures and logs if they are of any help.

Best regards,

Kristoffer

  • Hi Kristoffer, 

    Thank you for reaching out. 

    Could you please help with the following?

    - which stack are you using now? (BLEStack or BLE5Stack)

    - can you provide the log you obtained with the CC2640?

    I am not sure the GATT_ClientCharCfgUpdated event exists on the CC2640R2 platform. 
    A workaround could then be to consider the notifications as enabled as soon as you complete the GATT write operation to the CCCD. 

    I hope this will help,

    Best regards, 

  • Hi Clément,

    1. We're using BLEStack.
    2. Absolutely, see the included zip. Packet 705-708 is where notifications are enabled and the value is updated in packet 1842.

    cc2640_captures.zip

    Oh, okay. I assumed it would still be there as it's documented in TI BLE-Stack HCI Vendor Specific Guide19.1 GATT_ClientCharCfgUpdated (0x0580). If it turns out to still exist, we'd like to use it to stay backwards compatible, though if it doesn't we'll have to reconsider. The log provided will reveal that we have a custom HCI event in place for when a user registered characteristic is updated (USR_EVENT_CCC_VAL_CHANGED) which we could probably use instead.

    Best regards,
    Kristoffer

  • Hello Clément!

    I believe we have found a way to proceed where we assemble the GATT_ClientCharCfgUpdated event ourselves and then send it to the main MCU. Though before this is marked as resolved I'd like to be certain that this event has been removed from the CC2640R2 platform.

    I can see that gattservapp.h has a function GATTServApp_SendCCCUpdatedEvent() to send the GATT_CLIENT_CHAR_CFG_UPDATED_EVENT to the application, my guess is that this is for apps like simple_peripheral, simple_central etc. where both app and stack are running on target(?) The description is similar to what I'd expect to get as an HCI event from host_test, at least according to the docs.

    Best regards,
    Kristoffer

  • Hi, 

    I believe we have found a way to proceed where we assemble the GATT_ClientCharCfgUpdated event ourselves and then send it to the main MCU.

    Excellent, I can offer to review your implementation and comment on it if you wish. 

    I can see that gattservapp.h has a function GATTServApp_SendCCCUpdatedEvent() to send the GATT_CLIENT_CHAR_CFG_UPDATED_EVENT to the application, my guess is that this is for apps like simple_peripheral, simple_central etc. where both app and stack are running on target(?) The description is similar to what I'd expect to get as an HCI event from host_test, at least according to the docs.

    You are correct GATT_CLIENT_CHAR_CFG_UPDATED_EVENT is passed to the application by the stack. If this is not what you are already doing, you could consider forwarding this event to the host device. 

    Best regards, 

  • Hi,

    Apologies by the delayed response. Thank you for the offer but I don't believe that to be necessary.

    Best regards,

    Kristoffer