Do we have any example for implementing a characteristic with more than 20 bytes? Thanks.
Do we have any example for implementing a characteristic with more than 20 bytes? Thanks.
Example? Just set the length of the characteristic to what you want when you add it.
ble_gatts_attr_t.max_len
ble_gatts_attr_t.init_len
and note the defines
#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */
#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */
Thanks Martin. Is attribute length to be variable or fixed defined in the central? The spec I have for the peripheral only says length up to 512 bytes. Basically I have to use variable attribute length. But does central care? Or central is going to detect this vlen bit to decide what to do.
Thanks Martin. Is attribute length to be variable or fixed defined in the central? The spec I have for the peripheral only says length up to 512 bytes. Basically I have to use variable attribute length. But does central care? Or central is going to detect this vlen bit to decide what to do.