Updating an Attribute’s Value in GATT DB of a BLE GATT Server in PSoC 6 BLE – KBA228425
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Author: GeonaM_26 Version: **
Translation - Japanese: PSoC 6 BLEのBLE GATTサーバのGATT DBの属性値を更新する- KBA228425 - Community Translated (JA)
In a BLE GATT server, the profile-related data are structured in a database called the GATT database. The GATT database consists of the services, characteristics, characteristic descriptors, and declarations present on the server. In PSoC® Creator™, these attributes (characteristics, descriptors) can be initialized in the BLE Component configuration window, under the Profiles tab. If the characteristic value must be updated in run time, the application can do so by using APIs and macros as follows:
- When the value must be locally updated by the server itself: A GATT characteristic is often used to reflect a real-time value in an application, such a switch status or a sensor output, which would be read by a GATT Client. To update the value of a characteristic, the application can use the Cy_BLE_GATTS_WriteAttributeValueLocal API function.
- When the value must be updated because a GATT Client sent a write request: In this case, use the Cy_BLE_GATTS_WriteAttributeValuePeer () API function.
See the PDL documentation for more details. In PSoC Creator, go to Help > Documentation > Peripheral Driver Library.
- Tags:
- api
- application specific
- attribute
- characteristic
- cy8ckit-042 kit
- gatt database
- gatt db
- locally initiated
- peer initiated
- proc
- psoc 6ble
- psoc creator
- update
- value
- wireless usb
- write
- write request