/* Attribute write call back for the Value V2 attribute.  */
static ssize_t write_value_v2_5(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags)
/* Attribute write call back for the Value V2 attribute.  */
static ssize_t write_value_v2_5(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags)
{
	char *value = attr->user_data;
	if (offset >= sizeof(value_v2_5_value))
		return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET);
	if (offset + len > sizeof(value_v2_5_value))
		return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
	memcpy(value + offset, buf, len);
	return len;
}