This patch store the Appearance characteristic value read from the remote device. --- profiles/gap/gap.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/profiles/gap/gap.c b/profiles/gap/gap.c index 0ecadb3..4d21fb6 100644 --- a/profiles/gap/gap.c +++ b/profiles/gap/gap.c @@ -69,8 +69,11 @@ static gint cmp_device(gconstpointer a, gconstpointer b) static void appearance_cb(guint8 status, const guint8 *pdu, guint16 plen, gpointer user_data) { + struct gap *gap = user_data; struct att_data_list *list = NULL; + bdaddr_t src, dst; uint16_t app; + uint8_t type; uint8_t *atval; if (status != 0) { @@ -93,6 +96,11 @@ static void appearance_cb(guint8 status, const guint8 *pdu, guint16 plen, DBG("Appearance: 0x%04x", app); + adapter_get_address(device_get_adapter(gap->device), &src); + device_get_address(gap->device, &dst, &type); + + write_remote_appearance(&src, &dst, type, app); + done: att_data_list_free(list); } -- 1.7.8.6 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html