Changing BLE Attribute Size at Runtime
Anonymous
Not applicable
Apr 19, 2017
02:19 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Apr 19, 2017
02:19 AM
How to change a BLE attribute size at runtime?
Characteristics with a variable length are useful because you do not need to expose additional data that is not relevant. cyBle_gattDB is an array of the CYBLE_GATTS_DB_T structure, which defines the handle, permissions, container size (maximum length), and full (16-bit) or partial (128-bit) UUID.
The attribute size can be changed by writing the cyBle_gattDB[] array as follows, after CYBLE_EVT_STACK_ON:
cyBle_gattDB[CYBLE_CUSTOM_SERVICE_CUSTOM_CHARACTERISTIC_CHAR_HANDLE-
1u].attValue.attFormatValue.attGenericValLen->actualLength= X;
where X is the length of the attribute.
Notes:
- The attribute size can be decreased but cannot increase beyond the default size set in the BLE Component.
- The actual length of an attribute can be retrieved by using the following macro:
CYBLE_GATT_DB_ATTR_GET_ATTR_GEN_LEN (Handle – 1u);
Version: **
Translation - Japanese: 実行時におけるBLEの属性サイズの変更につい - KBA219049 - Community Translated (JA)
Labels
- Tags:
- ble attribute size
Rate this article: