Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3023301ybv; Mon, 24 Feb 2020 16:35:10 -0800 (PST) X-Google-Smtp-Source: APXvYqy3lsB3X+8aE7mpJ0D7CaDkY8cZMRPy5LvPwqq6SPHlqnKGMQx1uXNk1gmeQh71rkqsUK+V X-Received: by 2002:a05:6830:1257:: with SMTP id s23mr42405201otp.241.1582590910308; Mon, 24 Feb 2020 16:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582590910; cv=none; d=google.com; s=arc-20160816; b=A51HoRxPOjMocPOwiNSWKFbdaFf09YkOJjPk/owsSfTKR9dp911w2EyTxRxcgrFSnN EjtgUuyzBFBOUSTahpclApgOyKILnJUaFeDSJ9nPK8llaKH5PMSPcDVWHdxoZmNgt/s+ vHbAAhAtTjhashbKbPdKVv/V1PojzLh2yJDj7Na0zAmsG4SfhGkjAiYCOddheBFqO5ca lFIy5XSNOgMrWAGAdTJEP7/bm3SHvd0O2GHLpsieLVlrA15XnERIlPCtfl66KQ/qRZVi Ld71VcNOySUqkynnlOAzHkYhKlwfL1x52KA5jjwI9rUCMD1Gmot8YrPe+4d4svmGgvLV ASpA== 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=Res0HXUOda8HRoAlvYopl15Xx32Uf448+bwwDxLqWJ8=; b=JNFduqeLjQK4WEWkdcFrK2ijhfSZ6rtDkXK7cJWWY2510bOBxyFzQJzdsyWH0Ba0O3 9kyMrPvHRfaM/+mZ4dnUfiqcN1GTwKJZKtwyZOPc8h/pc/7p5uW5+/6+6rYpQlsEWa4W mddxgaPliLy/4Pq1FKEz/VRX5S0pLIsnHiY5ZdV9L9K2ANvkY7M6HCG8rWoxisst60Lv DvZj2mJ+8JEhizB9u90nTgWlMDHThqrnoGAn6mpBKyf+q9KpdXH/BGFbZMtUd7ojw3Bd uz7mUQuoCEw9kAut9rG/YbnlqKRmVAMe0GioFi8RvdeI+OAWxe+NOZrSpL6642O3sFMJ hkww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=beIUoD1i; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y205si5294917oig.137.2020.02.24.16.34.43; Mon, 24 Feb 2020 16:35:10 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=beIUoD1i; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728402AbgBYAdL (ORCPT + 99 others); Mon, 24 Feb 2020 19:33:11 -0500 Received: from mail-oi1-f176.google.com ([209.85.167.176]:35859 "EHLO mail-oi1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727976AbgBYAdK (ORCPT ); Mon, 24 Feb 2020 19:33:10 -0500 Received: by mail-oi1-f176.google.com with SMTP id c16so10872254oic.3 for ; Mon, 24 Feb 2020 16:33:10 -0800 (PST) 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=Res0HXUOda8HRoAlvYopl15Xx32Uf448+bwwDxLqWJ8=; b=beIUoD1iaf4uNmi+ZdQqTXFtTGOHXajE/zKFI0MK7t8kOx+NoUMQjzIiHlQTaft8Av Q/hmoPN0dwZpeRk2RtBIlF9/IOp1ZxGQlDr7CtTzIJ/y4iNE7gFlII0kRxWJgUcY186f dgXzhiao1tECQDXqnZJymxi3ZRymJOPSRrwIyxoqnfsJjviMSWvEwqWS413D6Rovgggh TqfExlaFvLit39+zOqKegQEXXQ5KAiWCc6MefIQLJ+OF1c5TxOrkzHdKAcS4H/S0jfPR xteehljDmgd4Gw5bxQbCnNYIxpsmOJVI4xjwdOrYtJeF7v8/eGgJAIj8wcX6d8fAdvXd UQeA== 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=Res0HXUOda8HRoAlvYopl15Xx32Uf448+bwwDxLqWJ8=; b=NbxcEkAc1tBc6vL5nTQ1MjVY8gODUcxtORztGTr6pkLh73KK1s9OT7Z7rQzJbEIGoH xZiWU//dQTWY7tUbei9uzrz8SfHcjDjTDSSaDqz9Wk+z0RcKwdekXJJtQ9VB2WdCr272 fRf4ZZIyc7jUk4+5Q/nCfJRlqXfBVIvIYcdJNcO5h+H4HehvlV7ZTHNcXkSrPHduN9NJ pvx4hoCc6+TdKQ2MSzotnDNmfBdBV2FtrDClXfOV4fv8JX1WQhtQLp/BKkeX1WQFim1j vY381CLjWDbiN6Mk+26bTqp/Te9rofHF9IsByt1xMGagijfsqLjHxiT6tgcB7hgMzJ5m 57SQ== X-Gm-Message-State: APjAAAWoFz5ELqmCheXqzRBPPNtdJWjfoQkS/Hcm2CafLr4iB5uLmExH 6p3Gp/AnZIM73GwlteJVUKYTdVBr49h7yrrJoq0= X-Received: by 2002:a05:6808:98e:: with SMTP id a14mr1344924oic.8.1582590789846; Mon, 24 Feb 2020 16:33:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Mon, 24 Feb 2020 16:32:58 -0800 Message-ID: Subject: Re: Bluez blotoothctl scan vs hcitool scan To: chris baker Cc: Barry Byford <31baz66@gmail.com>, Bluez mailing list 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 Chris, On Mon, Feb 24, 2020 at 1:56 PM chris baker wrote: > > On Mon, Feb 24, 2020 at 9:13 AM Barry Byford <31baz66@gmail.com> wrote: > > > > If the DBus API is not cutting it for you then using the MGMT API > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/mgmt-api.txt > > is what has been recommended in the past: > > https://www.spinics.net/lists/linux-bluetooth/msg68959.html > > > > On Mon, 24 Feb 2020 at 16:37, chris baker wrote: > > > > > > On Mon, Feb 24, 2020 at 6:08 AM Barry Byford <31baz66@gmail.com> wrote: > > > > > > > > Hi Chris, > > > > > > > > On Mon, 24 Feb 2020 at 10:12, chris baker wrote: > > > > > > > > > > > > > > So my question is, is there a way to get those missing advertisements > > > > > through the dbus api, possibly some additional setting somewhere? > > > > > > > > Duplicates are disabled by default with the DBus API. This can be > > > > controlled with the DuplicateData setting: > > > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt#n107 > > > > > > > > Regards, > > > > Barry > > > > > > > > > My apologies, I guess I wasn't clear (long post) but, I turned > > > duplicate data on when using the bluetoothctl command (via the "scan" > > > submenu) and also used the flag, "hcitool lescan --duplicates", when > > > running the hcitool command. So both scans should have included any > > > duplicates (unless I've misunderstood something). Additionally, none > > > of the missing packets were duplicates (again, unless I'm > > > misunderstanding what "duplicates" means). each packet had a unique > > > sequence numbers as well as the button data field toggling. > > Great, thank you. I'll look into the MGMT api in the coming days. That > said, is it a problem to use both api's (MGMT/DBus) concurrently from > the same app? My application supports both connected BLE sensors as > well as BLE beacon type sensors. If possible I can handle them in two > different threads, but the DBus thread for connected sensors would > still occasionally need to scan for new sensors (using the DBus > discovery call) and would still need to get characteristic changed > callbacks as well. Have a look at the other thread subject: Adding support for DuplicateData into the kernel We are discussing adding support to disable duplicate via MGMT since DuplicateData does not currently remove it but we might want to change that, or at least have some alternative API to do that. We could for example have a socket that enables a more direct access to the advertisments, that way protocol that work over advertisement would have a way to do this, in fact this might be better for things like mesh so it can coexist with bluetoothd. > Out of curiosity though, is the behavior I'm seeing normal? Or is the > sensor doing something improper possibly? Seeing as the packets aren't > duplicates why would they be filtered (or are they just not being > received to begin with for some reason)? The 11 second interval seems > kind of strange. Anyway, thanks again for the help! Chris -- Luiz Augusto von Dentz