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

concurrent characteristic write and notify

Hi,

I was just wondering what the sequence of events would be in the following scenario:

A S110 peripheral device (GATT server) has a characteristic with write access and notifications enabled (by the GATT client). The GATT client performs a write to the charteristic at the same time as the GATT server issues a notification (changing it to different value).

What would happen in the first connection interval following these events?

Parents
  • Hi Ned, From what you described, in the first connection interval following the events, we will have 2 packets. First is the packet from central to peripheral which contains the write command. Right after this packet, in same connection interval, is the packet from peripheral to central with the notification . Note that the value in the notification is the old value, not the new one comes with write command.

  • Just to clarify: Will each change of the characteristic (from either central or peripheral) be handled as a sequential atomic operation, meaning that there is no risk of one overwriting the other in some unexpected way?

    And is it predefined that the central's write will happen first, or will the notification come first if it happens first (but both still happen before the same connection interval)?

Reply
  • Just to clarify: Will each change of the characteristic (from either central or peripheral) be handled as a sequential atomic operation, meaning that there is no risk of one overwriting the other in some unexpected way?

    And is it predefined that the central's write will happen first, or will the notification come first if it happens first (but both still happen before the same connection interval)?

Children
No Data
Related