Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp161984rdb; Thu, 25 Jan 2024 11:08:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8b2JsN2UM95HCWQYdrfY7fcrGE7athchblHmaClNtIEJQz03kZdjY1DlTo43oo4P0CfBK X-Received: by 2002:a17:906:7fd3:b0:a31:984:96a5 with SMTP id r19-20020a1709067fd300b00a31098496a5mr27175ejs.94.1706209707644; Thu, 25 Jan 2024 11:08:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706209707; cv=pass; d=google.com; s=arc-20160816; b=ahvcnXQA7UxbPVF1eKPvsg8krUkP+N0DSiXgWPwoZ//x9jUD++h0pxdpiIc9cF5N6q Ocxfr1YEZSrztjoIW/gq0xy+AormEXP7tEESFCyJS9UC9X6V2fxsLGgCXRjtwSJGGcTj iB0qsYGNp+lnPxms2qAYWbo+jC9lnCvMXZosFwemWo/MXAb9L6j8nZN15ZnrXKsozU6G DoTls2+kcVjzoPP4RHyjMQsbhLvAWfEAjo+8rcuSRL5ZS/FKFUakjQOE3pNBdcNOma2f Zom6/cfZPX7MW6b9QgD0+tqC2Yv4cCUjijlDFdBqMjRNJVcnmyZSmM3600pUwtoyha0P vElw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=xQY7kDQazDC+92LFUTaH3RY9jBHVd4QYvxJ2MMroQP8=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=GiDl/Eg0yJvkv9YEevDa4vcm4GNkypYm9DvC1pcL7lsi3RplJKICW8b3IsVvtFmaa8 k4ImINn9CUTz82JgwqmugbqOD3mkaA8aah2SiJd+ZE+WuK4rkP/o/+Fzyi175nFqmLo+ hGT32XDlt9OYcofqAzrdbxQElZVgpkS7cS5TTBsty8j74jljwTtAgi7vyv+MMPmidV9K 5vi3R4ZNGrbgiNoOIwDCR28DNmEeDfViJYpi2xxNP7rb798+wKwtOv4eD3hVKfrrBAO/ pPO17SIW9vmocFdznIERVRheF48x7fwJkpFahZygBCcEZ6dnS5M160txsGdemgVUUtlH q9MQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bP3ZIMe4; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fx11-20020a170906b74b00b00a28ad652f5asi1246195ejb.531.2024.01.25.11.08.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 11:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bP3ZIMe4; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2026E1F237AF for ; Thu, 25 Jan 2024 19:08:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46DCD13474F; Thu, 25 Jan 2024 19:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="bP3ZIMe4" X-Original-To: linux-bluetooth@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 142241F60A for ; Thu, 25 Jan 2024 19:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706209697; cv=none; b=fP2I70wTPL6vuYJThLbgyRokC4aQbDl26Q0O853hx+sKKRIXUm2UkE7DV/GDEHw6fW98dKt0OoWbIXS5H9daWe7rO4f7V16sxV5/NkJx8OmK4aXQBstCRcZfks1Cv0d/tZRhT8qMAnETycvN9VWFKEF/OwaKwYtOcqxAmpjs8P8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706209697; c=relaxed/simple; bh=XcuCeY+R6cGqBDbu7H/pt4K3m18XxEYeiFZqLzCvnq0=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Type; b=ugyFTEk7lKNnctcgvtu8LoIuJ+FMVLT/fxzNXA1uzGF+vOB2DF4b4mFg5fRI+eOAe4tSV19r3almuCziHl1l9jZhXbS85muaG2b8L9N1/Gqphshs4w/QtKQZwERCLjKHBhoBF1q9/Ac9f+5pRn1ABIucsG2kBeDbZXqeSJhXFHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=bP3ZIMe4; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706209694; bh=XcuCeY+R6cGqBDbu7H/pt4K3m18XxEYeiFZqLzCvnq0=; h=From:To:Subject:Date:From; b=bP3ZIMe4H7ZV/Ewum+0aq+uo+nsVtOWpLPixhrDKQbBWKAS4MAFMa2Z1QW5MVsgoP Qk6Ccc0cv7ZfipI8GmpPMvH4ya5sRkcG6ZbB9SeEAKdLptPyJw6fPUwjwaA8hSYH0S uwKjyAIr1yEcTfdYeD4ddFBVJlSQQtRG05Qi4TB33GHvT4x1s+ggXKoLbKz6q7L6LR el6nb6561M/wFdkKocuHin7UAicknfO8OgmGJvp5SoTJNcfroszzqTdEH9uDnp1Hvv OBDs1rnHp4ZsIw3t1Q1TmAQ59OlTVLSYH8h4d9IrAV8QUPQPmNC8oBi/t+C3SNZsrt rrdDNQCdvdciw== Received: from fdanis-XPS-13-9370.. (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: fdanis) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 041FF378042B for ; Thu, 25 Jan 2024 19:08:13 +0000 (UTC) From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v3 0/5] Enhance GATT to pass PTS tests Date: Thu, 25 Jan 2024 20:08:00 +0100 Message-Id: <20240125190805.1244787-1-frederic.danis@collabora.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit The two first patches allow to prevent automatic security level change to allow to display the security error when running GATT/CL/GAR/BI-04-C using btgatt-client. The other patches add commands to be able to call GATT discovery functions from btgatt-client and get their results. v1 -> v2: Re-use att_send_op->retry and make it possible to prevent security upgrade on a per operation basis Remove "btgatt-client: Add function to search descriptors" as GATT/CL/GAD/BV-06-C test is optional Fix command arguments check in btgatt-client v2 -> v3: Split first commit in two, one for src/shared and the other for tools directories Frédéric Danis (5): shared/gatt: Prevent security level change for PTS GATT tests btgatt-client: Add command to prevent security level change btgatt-client: Add function to search service based on UUID btgatt-client: Add function to search characteristics btgatt-client: Add function to search all primary services src/shared/att.c | 26 ++++ src/shared/att.h | 1 + src/shared/gatt-client.c | 19 +++ src/shared/gatt-client.h | 3 + tools/btgatt-client.c | 251 +++++++++++++++++++++++++++++++++++++-- 5 files changed, 288 insertions(+), 12 deletions(-) -- 2.34.1