This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to know when a GATT client characteristic is updated

Hi,

I use the Current Time Service to get back the time from a smartphone to have a real time clock with a timer. On the current time service example, the value is read when we press the button.

On my application, I want to be notified when the smartphone updated the time characteristic.

I'm not accustomed with GATT client. I have read message sequence chart in the documentation but I don't understand what is the BLE Event that tell me that the GATT server updated the value in the time characteristic.

Thank you for your help

Parents
  • Following advises, I have tried to use the alert notification example without success. I added :

    • CCCD configuration to enable notification for the characteristic.
    • BLE_GATTC_EVT_HVX event to the on_ble_event

    but nothing happen in the client side when I update the value in the server.

    Help please

    Julien

  • I actually don't know the answer to that- having never used the MCP. Technically any CTS peripheral should have the time characteristic as notify, it's mandatory, however if the MCP is just for testing purposes with the examples in the SDK, perhaps it isn't.

    Can you use one of the little btle things runs on a phone? I know LIghtblue can pretend to be various sorts of peripheral, CTS is probably one of them and I'd assume they wrote it to be notifyable.

Reply
  • I actually don't know the answer to that- having never used the MCP. Technically any CTS peripheral should have the time characteristic as notify, it's mandatory, however if the MCP is just for testing purposes with the examples in the SDK, perhaps it isn't.

    Can you use one of the little btle things runs on a phone? I know LIghtblue can pretend to be various sorts of peripheral, CTS is probably one of them and I'd assume they wrote it to be notifyable.

Children
No Data
Related