Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1204952pxb; Thu, 4 Mar 2021 06:08:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5aZF9WkcHChpFP+bqykg27p2nt7KY3vv/k8Yg8f5ZTKuXpUTKfJPSbyKBrSHSJw5rALyc X-Received: by 2002:a17:906:4015:: with SMTP id v21mr4529050ejj.433.1614866898959; Thu, 04 Mar 2021 06:08:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614866898; cv=none; d=google.com; s=arc-20160816; b=aC5PafjTNAfmR/EsbtYZJAX9mnIxi5Gx0n6Yqk+LsvUDi499CiBb9LcA4qTMF/nNx1 drVV8oE7aKP2D/8qRJVrZwDSWUWXXFXgedB1LDieWaD7Pil7Ji11s8zbuyWKtPc5E5uK 8wCpoWll/GdzqAug+o26YYpmzEwjBfsfIEV/8Ejm5aoFUzDiQuKwa5OB9KMMUimvlDk/ qKFMJ9kvbKndk7OYAqiWYZJ4UykB++Ms0YMlHWWXX4xjb6ualbRAtZnUfqwM9Kp5JSHo 7YyKwLyo24RpqAkBhmmAttNim2vAG3knIJYpD4UXiT4sVSjeKL+4NtjcL3IMlIKrK2kx oHOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=H1ANAzzpCuxI0QDUf89zqCD4J3Mhy28KptnEtTnb2C0=; b=ecPjjO9eSdxUuISvn4V+bHVQczT+sxY1nzvNq8y/0hDEXPlXYQvTmXwMujv0doFCa4 /6+1w8ZaLonbK0gjmfXUShQ/uJ1FKPmiP4Neek3PXApbAAsbtaFbhUFBzhJ53WayNvKY FbC7wJRmS83m0ceitUK4c7iASWNB0CGw36QS+o5eUt5eyw1RSR6Z/wBc65by7fk4OGHU WGb53c3j/EbM0GX523c2gJ0HGp/cjE9+OY7VKjb4Hs6Fz6nLyv/FDdT1fuGSajm/8gFc uBary+kGUMPV0yg3EqswDsHHC9N3sTEIHvkc8u7L4W5WUlzE/WHCyFOVTD1GZTUa+HV1 60Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JnEgVskb; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk18si9511585edb.178.2021.03.04.06.07.29; Thu, 04 Mar 2021 06:08:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JnEgVskb; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239689AbhCDAd5 (ORCPT + 99 others); Wed, 3 Mar 2021 19:33:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244384AbhCCTV1 (ORCPT ); Wed, 3 Mar 2021 14:21:27 -0500 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 413EEC061756 for ; Wed, 3 Mar 2021 11:20:23 -0800 (PST) Received: by mail-qk1-x74a.google.com with SMTP id o70so20898871qke.16 for ; Wed, 03 Mar 2021 11:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=H1ANAzzpCuxI0QDUf89zqCD4J3Mhy28KptnEtTnb2C0=; b=JnEgVskb4oq9yqzfvjizI+GBL6HRnF5tiR9oH36kI5xoUPczVx8KRdpu/yY1TbuHFx QgeLPDYa3DlS2+u00+gpDIw1DE0tDydAqjb7a9oFa/fIZGzH7TJllnAGI9yLNH2d6vJg mDgwV8UecHzMxa4O012gOkdkWtb0UUugNIxb7D1FcglCJlv21yo/DpU2rJW6OC9h48+E xaqDoUB/9q11UPw1Q6Hkbh9qm8r4Cehz7at4HULJkQ8TZVVQy5FyRKag1YzN163M3zLs OPcQZ+xuYkqycTN9FA+jFD1aTRd94nDxmJWjbsbl+a0iPw6aOBjxLpoKpYoa4I0SKL1x +wGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=H1ANAzzpCuxI0QDUf89zqCD4J3Mhy28KptnEtTnb2C0=; b=d6F6kDZ7YcGwpvFp4clL37+4oMbbVGUHzopJNzq7EnETTI4qbQMaL6oblxPTTKT2l1 XbhJC+iZUlAPunoBleSXhbzctfcIb7hPOLaiU3PTt3bNBt7ebQ1JEIzk7e7NcBZfJbub 5eYqMY0E/398m5H5tZM9zWl/1cXCsUH2XPCm8Zv3TT4vfMYfGV9/W8CmUdQoP5U1Mf9Y rWminxMET7vPnTVwFHRpJVGia2l7Dl48Bk8faPB8Kb9Dh/PwzfWZFRdZhdLRrv74zM87 9jaq+6oZwuXs4eMl3LeX6oAuDywC+riCvcAtQTHsfRkU2nKhscFB48EYjNPiczmVoqZy WQHw== X-Gm-Message-State: AOAM530SUep0zbVlK4e/o/z5T7Z3gvpdJuZicQPHoDxWHGIaHb7rKRcm GRd4gL5R8KzLLE5VO/FxnChpA6DymDmAwkupkcAFiVd06tTbiPP81cA9t0ioHWoPAJLEGxIXufn hYKTxixCY+sJprEwsjLnTmnvhKmvyBKh7Ulm2JCfvWQyuqkgilpHhFZOvaLMqDDy1mGJdpX+VtP FbqWNJNYbN7/0+V1zU Sender: "danielwinkler via sendgmr" X-Received: from danielwinkler-linux.mtv.corp.google.com ([2620:15c:202:201:45cc:69de:aba1:a948]) (user=danielwinkler job=sendgmr) by 2002:ad4:53ac:: with SMTP id j12mr379109qvv.3.1614799222296; Wed, 03 Mar 2021 11:20:22 -0800 (PST) Date: Wed, 3 Mar 2021 11:20:08 -0800 Message-Id: <20210303192012.1695032-1-danielwinkler@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog Subject: [Bluez PATCH 0/3] Bluetooth: Fix scannable broadcast advertising on extended APIs From: Daniel Winkler To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, Daniel Winkler Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello Maintainers, We have discovered that when userspace registers a broadcast (non-connectable) advertisement with scan response data, it exposes a limitation in the new extended MGMT APIs. At the time that the parameters are registered with the controller, kernel does not yet have the advertising data and scan response (coming in a separate MGMT call), and will default to a non-scannable PDU. When the MGMT call for data/scan response is received, the controller will either fail when we request to set the scan response, or return success and not use it. This series along with another in kernel will allow userspace to pass a flag with the params request indicating if the advertisement contains a scan response. This allows kernel to register the parameters correctly with the controller. The patch is tested with a scannable broadcast advertisement on Hatch and Kukui chromebooks (ext and non-ext capabilities) and ensuring a peripheral device can detect the scan response. Best, Daniel Daniel Winkler (3): advertising: Generate advertising data earlier in pipeline advertising: Create and use scannable adv param flag doc/mgmt-api: Update documentation for scan_rsp param flag doc/mgmt-api.txt | 5 +++ lib/mgmt.h | 1 + src/advertising.c | 83 ++++++++++++++++++++++++++--------------------- 3 files changed, 52 insertions(+), 37 deletions(-) -- 2.30.1.766.gb4fecdf3b7-goog