I am still learning how to develop on the nRF52 DK. Nevertheless there are many BLE devices in the market that change their own characteristic / attribute values after connection has been established and some criteria is met. For example, in the following case:
- Peripheral and Central Device connect
- Peripheral device has 1 custom service with 2 custom characteristics.
- Characteristic 1 (char 1) has read, write, and notify.
- Characteristic 2 (char 2) has only read and write.
- Peripheral device has 1 custom service with 2 custom characteristics.
- Central Device enables notifications on "char 1".
- Central Device writes to "char 2" 4 times in quick succession.
- Directly after the 4th write command, the Peripheral Device changes the value of "char 1" to something arbitrary.
- Peripheral device sends notification to Central Device that "char 1" has been updated due to notifications for "char 1" being enabled.
In order to try and implement the above functionality, I have been following this guide on getting started with development. However, I am struggling to implement the logic in which char 2 changes after the 4th write command and not before. Any help or guidance would be greatly appreciated. If you require more information, please let me know and I will do my best to provide.