Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1256149ybh; Mon, 13 Jul 2020 13:36:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+Iop0ckss5w+C0uvO4cllmVhFjvxHVczD6IHNg/kXnh7A+KaikQ3kM9/Nc401j2tKM8Rf X-Received: by 2002:a17:906:3b01:: with SMTP id g1mr1505266ejf.353.1594672576627; Mon, 13 Jul 2020 13:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594672576; cv=none; d=google.com; s=arc-20160816; b=u7tlIq9Ckr0ZLcoDnHbmqz+2aBWGPwUZi7zUflqgwcTExcToyjfWNJDQEcSu/5SOhc OQMTXDPlk6lpKPvU5/2UBd+IWviScKaulZYxj9FSZ7tLh2p5nkQOK5K0YHd3A+L6t76v FT2JTvoASU2npndSw3iEdzT0lorx1hTIWoYelD1QqrWwp8R/wCRUZ2k5Oj/MYlMKdVDA MljfzpLTUsGEcqUex8CgdkdRDcxy2RAjsDgku9pkXvX87SidEjvUOlor1rAMNpkTtmk3 UC+WGUEnbmKQ/wUhl2zwnEp/rM7vWJftxABtK02xi7EbwIXR6MXERQRKolrk7NB2FQz5 aVHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nMz/znSoLz9ThqeCcpe4Ta7Jp3PPK8McYiisRlujivo=; b=lu9fIuiCN9SqEmPFR5RRdhNKnTSV2wuSyuutGG+WExwYmMJIqwooKBOxLnKC/OsEIh G5ejfcj/2TRppnHK6OrwoFfSb3/jsMVlNhoOvjodA2+Le52RYMSjV37JSNphJkBEM1vZ kJFKeJ7pfV6IPP4GezQHABZXIHMrA2pPF6NPYKpSpLxDfIWco5S5sET2YoIhyTolIRxE DX7PIaIddZq38q5ATYDJrcsT3N8B10bSPXyUCy4uQbUamptwO3dtwI3lB79+TledC+dz Vp9NEUOgjCBcy1xmYn1Xr+19Aq64cEdJpw8A4hllc8zWUG8wOBcqIDUX7YctzcjMfwYL 1lJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hStsKtHD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si9087258ejk.216.2020.07.13.13.35.41; Mon, 13 Jul 2020 13:36:16 -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=@gmail.com header.s=20161025 header.b=hStsKtHD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgGMUfj (ORCPT + 99 others); Mon, 13 Jul 2020 16:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbgGMUfj (ORCPT ); Mon, 13 Jul 2020 16:35:39 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC44C061755; Mon, 13 Jul 2020 13:35:39 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id h1so10583113otq.12; Mon, 13 Jul 2020 13:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nMz/znSoLz9ThqeCcpe4Ta7Jp3PPK8McYiisRlujivo=; b=hStsKtHDhzby1OziHm2z4ZQk+Kkfk9/Mcn796MrAlo/9drWdmxlAcPuTuicZD1grg8 gOUvemNn47pIFrqgyvq5RftLnHBTSYynDPES9gZSuekAexiFT9dShOwrZRuuhCsjdIqh ES7X8I3oQSjgC+hvYTE3PDBnuUSgpuzKNC8phve2H4f08dQFHIj3hqlFBB6+2e9U+RHa 8VhPOTCx0CBu1BhdtKziMQKKtcAVkMbsAVh3yBQsMHplFKxpnR0/w0t4VXU7HeH1n8fD Tlm1bW3dEU6cd7uCSqivbZGo3Nu/+d7fPAQATByu5Q5b5yNzHn1idjFVx5fSTz38CQVh xLLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nMz/znSoLz9ThqeCcpe4Ta7Jp3PPK8McYiisRlujivo=; b=lfDsDclCMtmmyowBjBM+YtoAWVCrWeOKIrxZD9k6a3wYTzapPhbS9mZ4U6MAY64sr0 5W29LMVglOwAqob1TYXqUtu3eTkxtzSWlxdH2x4bfPY9aGqsFBe6goB7XQU2viFcYkPS r1bXzcIWwtZwzIm5rA+/NqVbqUiiHf0RdHPCsgYjsxbP4zEXDt+bhh2qTl1s/v6/lAFa Zdjs7YNrR6CoiL4BPkrJNIRwjPw1dROIblwKRaIXahqKUIjAbvnGcq+F8qqAhXslhRBc 9YwUhENO0Y6F8ncg8GxIb7gtBooDc0CNKDvtloz6LWnQft1jy0dS7CodmMdbdMN8O3BH S0Ag== X-Gm-Message-State: AOAM533Lohmq9+kch1vq7HCtU4bNME7Y0MaU9h7jeGmRY8zqp6CpzzZe uwr4Z1PRvNVip0HCrXnQk+gJyxrfJ737BKxp2iE= X-Received: by 2002:a05:6830:1bd3:: with SMTP id v19mr1233271ota.91.1594672538465; Mon, 13 Jul 2020 13:35:38 -0700 (PDT) MIME-Version: 1.0 References: <20200713201441.235959-1-sonnysasaka@chromium.org> In-Reply-To: <20200713201441.235959-1-sonnysasaka@chromium.org> From: Luiz Augusto von Dentz Date: Mon, 13 Jul 2020 13:35:26 -0700 Message-ID: Subject: Re: [PATCH BlueZ 0/3] Per-device option to enable/disable internal profiles To: Sonny Sasaka Cc: linux-bluetooth-@vger.kernel.org, "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Sonny, On Mon, Jul 13, 2020 at 1:18 PM Sonny Sasaka wrote: > > 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). I wonder if it is not better to just have a flag indicating if the profile shall claim exclusive access (such as GAP and GATT services), so profiles that don't set that will have the services exposed so for battery we can probably just have it exposed by default since it doesn't appear to would be any conflicts on having it exposed. > 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 > -- Luiz Augusto von Dentz