- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
08-11-2017 01:38 PM
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.
08-13-2017 08:16 PM
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.
08-16-2017 10:51 AM
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...
08-16-2017 07:11 PM
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.