Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8577638ybn; Tue, 1 Oct 2019 10:04:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVMgtp1kNJYdYcMDTsoX+yPUiB1BnbkEG49vQtXgZxw3Qbjd8ta6oMefdcYzdUzY1Mv43I X-Received: by 2002:a17:906:2ec8:: with SMTP id s8mr25995657eji.275.1569949463965; Tue, 01 Oct 2019 10:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569949463; cv=none; d=google.com; s=arc-20160816; b=UxDWDyb9plcCacylEIe6uDimGoGCmOL0nIkaoNVZwPHo9994LrleLfoRK/PpHnmF5A ku6TKib6a75LMHtaLxzQl3wv4U2uh9JsQlBRrGR5ftfm10sJe4RjTmb3+9v7o89V9CgH h0L88q85CH3pfz7PB7uX43cCtQYgqsYRsm4QkrualpJ9/ErJTu6VT73MMUdQJFnUpWu0 CbvMdQsO9HEvcGE+bxP2HciUbM/1vbzBWrmkCQ2Js5eIHT6IBD6Q/Hdey2wwWQbxkvIl vxGBUJWvpnldXI7MsRUgVY3qlKd/YgsmnVPNkO03xEzu8HsKkq65aZAHEIj/uQjj67OY Q7iQ== 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 :content-language:mime-version:user-agent:date:message-id:autocrypt :openpgp:subject:from:to:dkim-signature; bh=34ctPPics1RYZDoR2/4l/h2EUP6q27oHFXgPjlE1hvY=; b=uleKVAjMAAbYN7gnhjOnfTNjwsimcjRxs6mwhJjyWuTUfPqQ7smLCVeEkHDjGyhbcR 8n3CPdJVzBaNoj0h0mE9bRX7clywY5BYZtdCom9lQrhQcweN+VA912ATMz+S9kwph0yT /NUORx7RdYCKIdCsO7pUA+hEtFvD0djunPG8OE/zgZB9SC91GoJfQneiXO9ECpB+m98V GvEkbhFf44unpRWOo+2v0ji6UmwfTRowPinhro2RIVZe2MuJu6Gb1c5IrelSZfQyZKPI 0QdgrEGpOdZbQ33HK1FHVDB7hJ6DYDUNuwkSVNZr3xzwDs6NV7lh81vEtrdnDIm1/o2/ RpxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@einfach.org header.s=mail header.b=PxM7j3sB; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=einfach.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si10862455eda.411.2019.10.01.10.03.49; Tue, 01 Oct 2019 10:04:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@einfach.org header.s=mail header.b=PxM7j3sB; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=einfach.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726102AbfJARAv (ORCPT + 99 others); Tue, 1 Oct 2019 13:00:51 -0400 Received: from postler.einfach.org ([5.9.2.179]:41322 "EHLO postler.einfach.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730127AbfJAQkg (ORCPT ); Tue, 1 Oct 2019 12:40:36 -0400 X-Greylist: delayed 489 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Oct 2019 12:40:35 EDT Received: from [192.168.5.9] (unknown [83.55.205.201]) by postler.einfach.org (Postfix) with ESMTPSA id 6132A2412 for ; Tue, 1 Oct 2019 16:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=einfach.org; s=mail; t=1569947545; bh=2lPPnnu4rQ8ZkqTNX6rAz4Cfq7L0JZIDcGIdRcCJAyk=; h=To:From:Subject:Date; b=PxM7j3sBUtmFCB/3MKjv7JuVfJqUEh/G5s9w3zg3YQNYH9wVCNbuPcNCDRqInsCBm g3bJur2ay/y8JjEmWkGAoPyDYzwC+4kYQWxDzL02yWePjaE6cavKud464/7+b2u+DC MRvaACqegjjrTrGtSN/Y1Oqmv5PeJhahG1kFcgtM= To: linux-bluetooth@vger.kernel.org From: Bruno Randolf Subject: bluetoothd: Please don't filter UUIDs Openpgp: preference=signencrypt Autocrypt: addr=br1@einfach.org; prefer-encrypt=mutual; keydata= xsBNBFJpIRIBCACxTu2oWUM4vbNxNSCcjw5ni3MeVFUUDNFukzepEUjbICSt/939ytVm7Z30 skb9SHJe3W6LPNjcjRni97FTumyb0paDSLlj31oyJHISVjm+Ho82/WTxjz2j0hl3xy8Ou21H JEXv+05mAtxfWUIPYfJImJ7N8x9J0fM2IxttGKbK8MAbYaVO4114fBSSIOt78TlXNQvwqHdf 4rLb3eXqnLF2XV1qyBBZPfieEbe3Rf2q/h65o7YFvrkYx1pEFrxSaYAymXzafcZj+zjz+Zb7 XslOCDwwKbI2UdBZEn868mNbgpTOn68NfFDx2jyQKu2u+36+mWfaetyMdBovQuC2d1QJABEB AAHNH0JydW5vIFJhbmRvbGYgPGJyMUBlaW5mYWNoLm9yZz7CwJgEEwECAEICGyMGCwkIBwMC BhUIAgkKCwQWAgMBAh4BAheAAhkBFiEE3A0MZg9YDVxz+wTLTTqe7xBJ1YEFAlvPjYgFCQ8K BvYACgkQTTqe7xBJ1YEF1gf9GhTWp5y6SSm/XdBfdhdjYvmu4jHqd+WZk9oKHHbW/0I22VH4 qyLqvMDGsRGD+nTchmM28CmxuWsHp56cG7eWZPnggTBssQfQNJdzLMkd7GQ8ZGuASVJF8tdP lHAZrTd+fb248Xw4nCyTXIw9t2/wXuXR0UGVwomMVM2PrCkPHVWbe8lak2YpR0NKm91IP2j8 WJGsIElS+bL8F6/ZGAL86izbf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wuFsCNjjWTsKXT0czbCYkKVlS8c9RjbpO+ehdicXRs4C9bF xAfkIcBUP6V2l6E89idXuD0LAJJG/v5CoNkykTDY0S81PcTAOwsZ+sSgcWb+tOUVQ/gnizj8 eSQ2NKJ38LOvT+Fc1EOMNEdHZ4V4xwM5n2XUd75lKKdynwysLFbc52nDZbZLdwBmw92a4kAT kcSK3qeB7qKuAXopxt5uEFNOKZeKF/UQlKrr Message-ID: Date: Tue, 1 Oct 2019 17:32:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (postler.einfach.org [0.0.0.0]); Tue, 01 Oct 2019 16:32:25 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.98.7 at bced1da0f74a X-Virus-Status: Clean Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello All, I am a developer using bluez via D-Bus to access GATT services and characteristics [1] and I would like to argue that bluez should not filter UUIDs of characteristics it handles by internal plugins. I recently came across this with the battery service (BAS). Our BLE device exports it, I can read it on Android, iOS and from other devices, but reading it from Linux is impossible. The UUID doesn't even show up in the list of characteristics! It took me a while to figure out, that it is filtered out and that you are supposed to read it via a different API on D-Bus [2]. It surely makes sense to provide this more generic API, but I'd argue that all services and characteristics should be available via the normal GATT-based API using org.bluez.GattCharacteristic1 as well. One of my clients, for example, uses Linux/bluez as an interface for Server-based reading and writing of GATT characteristics of several managed devices. So I can read all those UUIDs, but why not the battery level? What happens when Bluez learns other GATT services, will their characteristics then also disappear? I think there is a strong argument for maintaining a generic API for GATT reading/writing characteristics independently. I made the following change to the bluetoothd code to get access again to all UUIDs, and I would like you to consider to include it upstream to enable us to access all characteristics via the normal GATT API: --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -2006,9 +2006,6 @@ static void export_service(struct gatt_db_attribute *attr, void *user_data) struct btd_gatt_client *client = user_data; struct service *service; - if (gatt_db_service_get_claimed(attr)) - return; - service = service_create(attr, client); if (!service) return; Thank you, bruno [1] I published parts of that as an open source library: https://github.com/infsoft-locaware/blzlib [2] https://stackoverflow.com/questions/49078659/check-battery-level-of-connected-bluetooth-device-on-linux