Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp751500rwj; Sat, 29 Oct 2022 10:12:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FzwG9u8lGoMA92mVUMBpexKATv+fVUQPQmcLiuhud6dWRrqKjj+LzdvcYll/daBjzqbnq X-Received: by 2002:a17:906:8a48:b0:7ad:aaee:cbec with SMTP id gx8-20020a1709068a4800b007adaaeecbecmr4805096ejc.36.1667063567848; Sat, 29 Oct 2022 10:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667063567; cv=none; d=google.com; s=arc-20160816; b=cjimzIYMfRQFP4iwD29ENAs01YsBe/Cms7nNsFH9HSrV2PnR0t2M+KKhqyxyxj8O0Y mzdMRSJM2hi0oMd1k1Ntx00+VvhhMMTugfysRAjxGK3pVMr2evMjRF6P8XwO066MILWE B5HqfgjQLq/AzOOahk6IWxwUuWVzEv2fordBluTlHzjex0jtAvS0a1eXfik/CX5alF+q 62K4pwamJeesHyBAoY5XogFZ20oJml6jZX7J7phfdS+sYL1Edw+0Y1X0MEzPl0scHagm Dqk1DSA6znqjuwMpKhoklwVVp29pT/2eTRsd9WRQ3Qc/v4HQvqFbbPinoyYHNlyvkH2D rnng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:to:from:date:dkim-signature; bh=m8DGISEllBGbiA/WT3/5rcJdHAgrHJnE8nL33v5WsVo=; b=dNTOgOvT2aJFuF3Dcoq8CfTSBbpOfmmJkNHUnwN4s9x70FSMPZZ9/iemh8RH/Xrx51 o7CuyBV0U760mNrz2EjOS+FROCMltHIvI0vpO/6FGFDC5qfA+UMlvypljEewzHvIDxF1 i/UWD50/N4KNxLDunmFWjAGDhxS4ezgs0HbVhTFIosU/k30LJeOIJ4DaS+yXOHrmvjBJ KEde+3V02OlgN5rs7zwxjCyThYbhLaqM6de0uLlSXY+daG724Dh+at1wK++JcM1zS32w dAYWUmrmCXn4fJTilqdmqXzGl1npONu8o6w2Y47+cV3XjVO4y576ZxbJGWqQ6MZkmeat 00KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="dTD/pISf"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr19-20020a170907721300b0079b8cce1170si2153238ejc.950.2022.10.29.10.12.16; Sat, 29 Oct 2022 10:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="dTD/pISf"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbiJ2RI3 (ORCPT + 99 others); Sat, 29 Oct 2022 13:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiJ2RI3 (ORCPT ); Sat, 29 Oct 2022 13:08:29 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C412049B63 for ; Sat, 29 Oct 2022 10:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=m8DGISEllBGbiA/WT3/5rcJdHAgrHJnE8nL33v5WsVo=; b=dTD/pISfPExLDDOkciF5mhPd8F bDYAh68Xb5FWgIq4i7n1nRNH9ZMDdW9fud/wVhUKuZrnN0BX/CWJMtZlvPctC+WHdg+U+0Da4rtsr mW/B8cd/FdQIcZRw9mRFgfXImtY9vxlrPi4TR4CKYbgOXQD8iDnEknAEJm1ZZbtYlYz86S30BGNzG 8wIBHakb/s3AZ4sEE0sdt9sMg5F/dUzgGOFXNY1FLy7CWIzuFYVMRJgq9wnjgZb9ENFHCCwZn3qlv CTtoGEmusP3iJJkqcfZDgbre+9o+nmMMzz97yxpyI/T8/zk4uV44jntVAaexlTINTkU6BQgrYB8VA mdjPYmAQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35026) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oopJn-0001mI-6y; Sat, 29 Oct 2022 18:08:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oopJj-0003hy-MG; Sat, 29 Oct 2022 18:08:19 +0100 Date: Sat, 29 Oct 2022 18:08:19 +0100 From: "Russell King (Oracle)" To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Subject: BTLE scanning - requesting duplicates Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham 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, I'm aware that in the bluetooth dbus API, there is the facility to request duplicate filtering to be enabled or disabled. I wish to disable duplicates, as some BTLE devices I have publish data rapidly in their manufacturer data which I would like to capture. However, it seems that setting a filter specifying the state of DuplicateData in a filter does nothing - I get an update from the MyNewt NumBLE based device about once every scan (so once every 10 seconds) which is way too slow. I haven't found a way to speed this up. However, what I have noticed is that no matter what I do, btmon says: < HCI Command: LE Set Scan Parame.. (0x08|0x000b) plen 7 #88 [hci0] 149.394365 Type: Active (0x01) Interval: 11.250 msec (0x0012) Window: 11.250 msec (0x0012) Own address type: Random (0x01) Filter policy: Accept all advertisement (0x00) > HCI Event: Command Complete (0x0e) plen 4 #89 [hci0] 149.395217 LE Set Scan Parameters (0x08|0x000b) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #90 [hci0] 149.395313 Scanning: Enabled (0x01) Filter duplicates: Enabled (0x01) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The hardware is always told to filter duplicates no matter what I do. Looking at the kernel code, net/bluetooth/hci_sync.c, hci_active_scan_sync(), it seems that the facility _not_ to filter duplicate data has never been implemented, except if we have an "advertisement monitor" attached (what's one of those?) Is there a reason why bluetoothd doesn't pass the request for duplicate data to the adapter? Can it be made to do so? How would that be achieved - can the management commands be modified to do this? Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!