From a1bac54378f6ff970134af9f91523c471bac23d6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 4 Feb 2016 14:32:06 +0200 Subject: [PATCH] drivers/nble: Fix not being able to register CEP attributes Registering CEP attributes was not possible because bt_gatt_attr_read_cep was not implemented causing the following error: bt: bt_gatt_register: Failed to read attr: -71 Change-Id: Ib0860cf657d6a6001c1fd4dd2712ac7361edee1c Signed-off-by: Luiz Augusto von Dentz --- drivers/nble/gatt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/nble/gatt.c b/drivers/nble/gatt.c index a95a516c2bd..0947d60de82 100644 --- a/drivers/nble/gatt.c +++ b/drivers/nble/gatt.c @@ -328,7 +328,11 @@ int bt_gatt_attr_read_cep(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { - return -ENOSYS; + struct bt_gatt_cep *value = attr->user_data; + uint16_t props = sys_cpu_to_le16(value->properties); + + return bt_gatt_attr_read(conn, attr, buf, len, offset, &props, + sizeof(props)); } int bt_gatt_attr_read_cud(struct bt_conn *conn,