Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3092596pxm; Mon, 28 Feb 2022 11:51:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkFpx+/IEGeAuzBpsOUtB+g4Sm3lvjzgKCJNLa7J2auiWOrP4Drmb+tnh1Q8VqmyqFhIlc X-Received: by 2002:a17:902:eb8f:b0:151:45e9:533a with SMTP id q15-20020a170902eb8f00b0015145e9533amr13771364plg.89.1646077883677; Mon, 28 Feb 2022 11:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646077883; cv=none; d=google.com; s=arc-20160816; b=d6E6ivI9pemTv82/DBFTqjK/707ZKCp16JFhukE05agk5IvjwJgLi5ze08fpUx1Iq6 usRAm39e3wsvFVaXNhVW13MusoWBN8uAeuv+6owl9TYLNFwFx5HB+yUA3gVYcNTXOsAi APx7COYeTXx7essa8TNZJQoRsy1jlNY8kyd4zI0fcZHe6ZSXBA+YmXxNA0b2domjcTC5 dJrBNRaJ3xiwga1T8KODCNNsgXGwBgl371t9WkHGGE1egs9PlxDQBrkC8yninlvDGGoN 726G+xoStZLKObz1MUbIk7I+r8SKJ44Tqilna0nwvBX+GcAoMpzrSo4Z9Avwqf5uUHGJ 9Iyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nMDxHOhE1DGtLVy6lIjIv+fobHY3F15WDVFcK9E2w30=; b=x//L9hLeybZBfMlSPU5zlIJ/rhBXC81deKyPZYrSFbq6hTgNuifDSe++90YB8D5q41 KeoDZbccWp5lMjOq/v8PYA0J0ZItY8fkU9L1/m/ESjRPmTyaGsfuqvTHRQvf6ekqkDle xGaiLb73vkgDfSxBO2ASb/FvqQdNavcdY4fhSu7LxR4vK8tqpry1mWonmSmoIoUmgvNH 5L70TBIfowN8sNNudL1H5OX+A0ybZGja7wz7PxddmTbfifkVZhzRBwCA+vM7vVbWekiU 7C7hQXy/YXMS9Pm67Pjj9kSFiKeSZ39JQFvzjG72GfDIEbBAO/Kpxd7QRNAdBVuY98uG r6FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UUcm6fQY; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x13-20020a170902a38d00b0014af71a5b9fsi9692533pla.229.2022.02.28.11.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:51:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UUcm6fQY; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 184F4CB921; Mon, 28 Feb 2022 11:27:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236218AbiB1Spq (ORCPT + 99 others); Mon, 28 Feb 2022 13:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240873AbiB1SpS (ORCPT ); Mon, 28 Feb 2022 13:45:18 -0500 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22F75473A7 for ; Mon, 28 Feb 2022 10:44:22 -0800 (PST) Received: by mail-yb1-xb36.google.com with SMTP id p19so22418009ybc.6 for ; Mon, 28 Feb 2022 10:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nMDxHOhE1DGtLVy6lIjIv+fobHY3F15WDVFcK9E2w30=; b=UUcm6fQYf/FdycHdWXLnZPaEjoxZ2sN7sS64ILv4+bqiQ6cwFEpi5LuOiKiVN15EFI DtwjBlbuVVr60Huvm5QRwJPOOjXqH0eZNZnzSYsZ4+gFW66vjz/mGbTVG/S/EIajfm3m /froyLBfPyxXLYHW02gxTd0//aJNAASUCFVwU1RYqkXGxptd5ddyRGnVPQj7HxxnSsZg M8I03atU8ZXM+MdCxN3W2CxQ8Sho1woTHHtqrFXBm/2CUpLSEoVnQPeD6tYmFzRy4QvR 1ngw7Tu/v1lSw69nuSlaYwNjCOA9cj1WSTlJ5Yfqy8pMVe+rVs6IMDm/acYtaDLH6QhT gMLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nMDxHOhE1DGtLVy6lIjIv+fobHY3F15WDVFcK9E2w30=; b=gTrzfBgobPtN7kz9bw3f4QVqg88sVAo6tHBQKgj9Y4lhJHKZ57HtGBkNkpbzMswLDV 45RiK4GCniBmu0WUwzVmJ+VcZAOnWvEFeqTqh2jX4NuW3WIYtyhlPaclwAG/X634Ola1 8nbed+Xxb1O6p/y89cCcVlkvuMTbS7DfhhS/4fiR147HREUTWhA27CikRdrQ8H8Q2L+E NDbXpy89y8B69R63QgPxcQA4pS7asVvrcUj2O6YtqpPUE0OwVnNqyV6JS0pm+wRSaV/b wOZOx+tISArUNz8OfL+nOLkh4pbWwyFAqKWsF+OUlMMXGg2op0AcGCai1OFh3y2UOXzP hiyw== X-Gm-Message-State: AOAM5321yoKri7wuiiUfTK3h4nubTeaieZsCIt0krHyY/iT5tMwo5e7j 3NsI46FXNVQuboo65JJfjXk8YesZAtVInd5DcEDOatqej4w= X-Received: by 2002:a25:d803:0:b0:614:b201:a798 with SMTP id p3-20020a25d803000000b00614b201a798mr20242523ybg.612.1646073861308; Mon, 28 Feb 2022 10:44:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Mon, 28 Feb 2022 10:44:10 -0800 Message-ID: Subject: Re: Battery1 vs. GATT reporting To: Ed Beroset Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Ed, On Mon, Feb 28, 2022 at 9:45 AM Ed Beroset wrote: > > In > https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=713f6f09 a > flag named "external" was added which, if I'm understanding correctly, > is supposed to mark the Battery1 profile as safe to also share via GATT. > However, I was recently working on an application that relies on the > GATT API for battery power and found that it only seemed to work as > expected (reporting via both) if I set the flag to false rather than > true as in the commit. I looked through the code and it all looks > correct, but my observation indicates that perhaps the sense of the flag > is somehow inverted. > > Here's the project I was working on, with the relevant bug report. > https://github.com/AsteroidOS/libasteroid/issues/13 > > So can someone verify that: > 1. the interface is intended to be shared via GATT and Battery1 > 2. that it does not work that way today Did you check if that was not fixed already? It seems to work alright with git latest using bluetoothctl: [NEW] Primary Service (Handle 0x0000) /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0020 0000180f-0000-1000-8000-00805f9b34fb Battery Service -- Luiz Augusto von Dentz