赞
学习了:
如果定义多个特征值报0x87错,虽然头文件定义是内寸不足
#define BLE_STATUS_OUT_OF_MEMORY ((tBleStatus)(0x87))
但是调整CFG_BLE_NUM_GATT_ATTRIBUTES可以解决
CFG_BLE_NUM_GATT_ATTRIBUTES
CFG_BLE_NUM_GATT_ATTRIBUTES must be ≥ 2.
Parameter Description:
Maximum number of Attributes that can be stored in the GATT database
When a GATT characteristic is added to the database a minimum of 2 attribute records are needed: one for the characteristic declaration and one for the characteristic value. On top of this, additional records may be needed based on the characteristic properties, in particular:
- If the characteristic has the notify or indicate property set, then one additional attribute record is needed.
- If the characteristic has the broadcast property set, then one additional attribute record is needed.
- If the characteristic has the extended property set, then one additional attribute record is needed.
In summary, one characteristic may need from 2 to 5 attribute records depending on the characteristic properties.
|