I would like advice on whether the following is a valid ble transaction.
We have a product with the nrf52 in it running sdk 12 and softdevice 3.0. This is setup as a a peripheral and it runs a service with one characteristic that can be written to and it supports notifications.
The phone connects, then enables notifications and then we immediately start sending data via the notifications from the product to the phone.
We have a couple of phone apps and the writers of these have written the notification request in different ways. One uses the Write Command for enabling notifications where the product does not acknowledge the message and the other uses the Write Request where the product must provide a Write Response to the request. Here lies the potential issue.
We dont have any issues with the Write Command so all OK here.
Write Command - No Response
However we do see issues in the phone app with the write response. Here we can see that there is a race condition between the phone getting the ack to the Write Request and the Data being sent via the notification. It sends it once it sees that the notifications have been enabled.
This this an issue? They are on different handles? Is this race condition valid?
Write Response - Response comes back (correctly??) before the data is sent via the notification
Write Request - Write Response comes back after the data! This this an issue.