I need help regarding the Bluetooth example mentioned in qsg139. On page 19 it is mentioned that one has to add field structure of GATT Characteristics manually. Being new to this development I kind of stuck on how to do it. And also how to modify the value of your characteristic in the database afterward. The commands that are mentioned, I am not sure how and where to use them.
This is not a pre-defined thing, I mean, the structure depends on your requirement. So let's still take the current time as an example, we can see it's defined in the document to be:
If I don't care about the year, month and day, I only care the time in one day, then I can define my structure to be:
So it's flexiable and you need to define and optimize it by yourself.
But where does that have to be written?
I follow the qsg139 document, but when I get to the characteristics I don't know what to do.
And if I don't do anything in the application in unknown only appears current time but not year, month...
The current time shuold be sent to the peer device by bytes, so you can see from the function it has been changed to uint8_t buffer((uint8_t *)¤t_time). So you need to get it back to struct or parse it by yourself in your application.