Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1245798ybh; Mon, 13 Jul 2020 13:15:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYisvOgUpjQU/2nehtY/3xfXymsVWn29vArRIxjeJCDQF5JVXQy8oIjE+anSwDFqTOx2Z9 X-Received: by 2002:a50:e385:: with SMTP id b5mr1079913edm.130.1594671345979; Mon, 13 Jul 2020 13:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594671345; cv=none; d=google.com; s=arc-20160816; b=ejvl3bqz5NhIcJHTHqHltmJJoop8DCULHRwGYL+BzdgDAXWtad9dInNQl6s4bp/J1k xrXWBwJY6XRhRrpEDkkKp9jWrEbusqySIyw+hr+zsWl+3fJOqYDzt/ywmApC6WGTv6Q3 8HtQjjlOHVSkYRrGaRjG07WxUrTtOWLFGJCCPFvLkNw3OXEcT6nI7hFDxasgqEZo5pMh EQDTWGfWWG/D5NugjQs/kRvY3RgFGIdoxUqTI0TyYcjsDBkYognhxD2y8NHc1R5xltrc nl/8M7+Hkv8h/sUDtABlFjb0CrZpXs+/LfxIU9KxY6hKQ1JBo8eo64ZQpF8K7kGWs6VD B+1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0IW9qTSFXBwOuk1yrc6ynqLxslXbEquo65j1s7zEORQ=; b=woPIhDjc+Fhp42VMLquk4o/56oiYWNrOhmwne2CNa7GNCyKohzU1OYzOn9YT7XKxiZ aoqInt2Vh4E3XI3qfXSeYKWOVDPkdO+8x74QBvPn7sYMWT8q0bHK1rYuoRihmPYLndym Y0aVjAYLzKeoCCqrHFD3+6VTwvco/dV13BzPC0tNwiDgslWrogDSNXLO6EYxdmzVLDBy PkXKlxjOAPrE5h6rhHRUYKzDJNmAwVf3MrzsrgoRRkrWS8SeW95+bQQYQhAcH1u4teyK hJXcWP3ZUzL/3zOBZsKJ6V9j2/MuY/Jer5liyYLLvFPj+qya5DxwoAN3XetkOMlV5BpY nFiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=d1Tad3Vs; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si9492778edw.233.2020.07.13.13.15.00; Mon, 13 Jul 2020 13:15:45 -0700 (PDT) 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=@chromium.org header.s=google header.b=d1Tad3Vs; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726321AbgGMUO4 (ORCPT + 99 others); Mon, 13 Jul 2020 16:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgGMUO4 (ORCPT ); Mon, 13 Jul 2020 16:14:56 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB9DC061755 for ; Mon, 13 Jul 2020 13:14:55 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id cm21so424967pjb.3 for ; Mon, 13 Jul 2020 13:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0IW9qTSFXBwOuk1yrc6ynqLxslXbEquo65j1s7zEORQ=; b=d1Tad3VsvL+6WdpMhxDQv0AMjB5f/1N64Smmm0HX9k4VhGFykZAsnC9u0wZ5V1k8mB VvWV9xL/SS6EaSmu7jjP2+6Rcedd/xU2DazKTGlTe7+DOnuGkt6gvACINTgkC/IL6cXk E1vR9X3TohSqwYi1HfTkjg8PJIHYvDECsvHU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0IW9qTSFXBwOuk1yrc6ynqLxslXbEquo65j1s7zEORQ=; b=VPZB2HDndKHAlJvlqAwsz4x4nVlsuRdiAlmR8XCWKk6/F5eOd8oQ0oiiWmxVic//v9 eivnnik5WUQ0MH7ILEXdzHgB0g7+38cnSyOXQEBwbhzfdWp5HOvifasJAmz5+63r6qmk t49jubzYpx88DD47e+ZSXEmHheaaPdMSsapYmTjo4eBbcdjtv30vQKoTPS3Ox4n8lm1j gvmePLZo6SGIKWBcgIWwo/hOGE8DRyyEHCyONxy3aaBLM9IXdmA5ycd2pEeA4HIRQiSy A+/n5o/EVkWFZOrrx5/osv47ZpijnQZB6UbZ9w+0XnE3O113m/dY7ZYszZE/vmlzNi1t OLhA== X-Gm-Message-State: AOAM530bqAdlxZAt0VT3WJecBm9jEzsEJ8yXpLPcUisYqoYkkXqsTBAj rJDQqnyKiw8oDCvpGf8O25zV3w== X-Received: by 2002:a17:90a:db48:: with SMTP id u8mr975363pjx.169.1594671295378; Mon, 13 Jul 2020 13:14:55 -0700 (PDT) Received: from sonnysasaka-chrome.mtv.corp.google.com ([2620:15c:202:201:4a0f:cfff:fe66:e60c]) by smtp.gmail.com with ESMTPSA id h18sm7866135pfr.186.2020.07.13.13.14.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2020 13:14:54 -0700 (PDT) From: Sonny Sasaka To: linux-bluetooth-@vger.kernel.org, linux-bluetooth@vger.kernel.org Cc: Sonny Sasaka Subject: [PATCH BlueZ 0/3] Per-device option to enable/disable internal profiles Date: Mon, 13 Jul 2020 13:14:38 -0700 Message-Id: <20200713201441.235959-1-sonnysasaka@chromium.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch series adds a mechanism for clients to choose whether to enable BlueZ internal profiles (e.g. A2DP, Battery) for specific devices. The motivation behind this feature is that some applications (e.g. Web Bluetooth or Android apps) need to have control over all remove GATT services, like Battery service. With "battery" plugin being enabled on BlueZ, it becomes not possible for those apps to work properly because BlueZ "hides" the Battery-related attributes from its GATT Client API. Disabling the "battery" plugin won't solve the problem either, since we do also need to enable the plugin so that we can use org.bluez.Battery1 API. The solution that we propose is that clients can choose whether to enable internal profiles for each device. Clients know when to enable internal profiles (such as when a user chooses to pair/connect via a UI) and when to disable internal profiles (such as when the connection is initiated by a generic application). Sonny Sasaka (3): doc: Add "AllowInternalProfiles" property to org.bluez.Device1 device: Add "AllowInternalProfiles" property to org.bluez.Device1 client: Add set-allow-internal-profiles command client/main.c | 38 ++++++++++++++++++ doc/device-api.txt | 13 +++++++ src/device.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ src/hcid.h | 2 + src/main.c | 10 +++++ src/main.conf | 4 ++ 6 files changed, 163 insertions(+) -- 2.26.2