- DBG("char path [%s]", gattc_char->chr_path);
- _bt_hal_convert_uuid_type_to_string(char_uuid_str, gattc_char->chr_uuid.uu);
- DBG("char uuid [%s]", char_uuid_str);
+ if (!memcmp(&gattc_char->chr_uuid, &char_id->uuid, sizeof(bt_uuid_t))) {
+ INFO("Found GATT char uuid");
+ DBG("char path [%s]", gattc_char->chr_path);
+ _bt_hal_convert_uuid_type_to_string(char_uuid_str, gattc_char->chr_uuid.uu);
+ DBG("char uuid [%s]", char_uuid_str);
+
+ /* find descriptor */
+ gattc_desc = _gattc_find_desc_from_uuid(gattc_char, &descr_id->uuid);
+ if (gattc_desc) {
+ DBG("desc path [%s]", gattc_desc->desc_path);
+ _bt_hal_convert_uuid_type_to_string(desc_uuid_str, gattc_desc->desc_uuid.uu);
+ DBG("desc uuid [%s]", desc_uuid_str);
+ break;
+ }
+ }
+ }