Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1601435lkv; Wed, 19 May 2021 13:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy6kcHjU72N8J+sw+FhoyCdDN1tG5gid6IktgK5m2bZf5bumEFU3PN+g/FsymIl8VTHlrV X-Received: by 2002:a5e:8c11:: with SMTP id n17mr1603576ioj.53.1621457293354; Wed, 19 May 2021 13:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621457293; cv=none; d=google.com; s=arc-20160816; b=EDBrU2u9lYEwi+DuFfz/jFAdUoLPz8tbWVJuzkk5YUmUN+yyixzwgi7kGnD1y2bgEt VsbhMLJMkhnGlHryfJAHGoZ1XSN/x66tkSDDM7DXwEGNMqEv9la6I077Btuh1bWZ0EHV Xx9ZXvAtdPyhLsXMXGMy3LwMBN+Pke8LhHewb34oinXqpQ3c/LEiCtOojDFRqRWZq28R babUWFNPsD9mtKPxGK/x42KHBYNqhSdbKoEM9OGSEGpzRsM1SENXE3Om/feGAm3NtKz9 q3dTYxt3t+F0ANPg7SvtdJ+hzhgQ/NPMOwxWL70Dp3u5AOhW3LDgSBRqimjN4mL5ajKB rKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=uOxV9Nkf4MrUpekPr1nrW0Eh3MUqZCXoYHlIj03jPww=; b=tfqq7eQjBrZHX0ZEWmyytaRqrwue5zGl3mcXGKi3Z0/QKFozz3kojzp4jTjooIo+bf opFFpGViXZnEbJOYyoObuWteqXYGSZHFx122KIz2VxOtrOTQx+7+XV2qqPL6SDavsP4x oH/jnjVN0z3b2xDC7I814+PIdt0RVWCJkfqdBPvAR7JPVKoQSIs9V9jlf66n8R3MUrt9 ku5pwuCyEkuaE7JAq1eYHOd8Lw4uMrfm13KJesfV9aaiOh3kacSQJlG6cnnRTbv+34/X gQMFfqa15ZhXBxwGKX2OB8JZ25PtQWfcp3ralhHfJL3zlF3G1/QmKD0LyTc7a/Wag2Xu pxmw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si380571jav.104.2021.05.19.13.47.56; Wed, 19 May 2021 13:48:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbhESUsn convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 May 2021 16:48:43 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:52579 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbhESUsn (ORCPT ); Wed, 19 May 2021 16:48:43 -0400 Received: from smtpclient.apple (p4fefc9d6.dip0.t-ipconnect.de [79.239.201.214]) by mail.holtmann.org (Postfix) with ESMTPSA id 3791CCECD4; Wed, 19 May 2021 22:55:15 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: [PATCH v1] Bluetooth: disable filter dup when scan for adv monitor From: Marcel Holtmann In-Reply-To: <20210519102745.v1.1.I69e82377dd94ad7cba0cde75bcac2dce62fbc542@changeid> Date: Wed, 19 May 2021 22:47:20 +0200 Cc: "open list:BLUETOOTH SUBSYSTEM" , CrosBT Upstreaming , Yun-Hao Chung , Archie Pusaka , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , open list , netdev@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <73ED48AE-974A-476C-83AD-E6D09CDCBFC9@holtmann.org> References: <20210519102745.v1.1.I69e82377dd94ad7cba0cde75bcac2dce62fbc542@changeid> To: Howard Chung X-Mailer: Apple Mail (2.3654.80.0.2.43) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Howard, > Disable duplicates filter when scanning for advertisement monitor for > the following reasons. The scanning includes active scan and passive > scan. > > For HW pattern filtering (ex. MSFT), some controllers ignore > RSSI_Sampling_Period when the duplicates filter is enabled. > > For SW pattern filtering, when we're not doing interleaved scanning, it > is necessary to disable duplicates filter, otherwise hosts can only > receive one advertisement and it's impossible to know if a peer is still > in range. can we be a bit more specific on which controller does what. I am not inclined to always disable duplicate filtering unless your controller doesn’t do what you want it to do. I also disagree with the last statement. If the device moved out of range (or comes back for that matter) you should get a HCI_VS_MSFT_LE_Monitor_Device_Event event that tells you if a device is in range or not. Device leaving: > HCI Event: LE Meta Event (0x3e) plen 43 LE Advertising Report (0x02) Num reports: 1 Event type: Non connectable undirected - ADV_NONCONN_IND (0x03) Address type: Random (0x01) Address: 01:9A:1F:C0:30:15 (Non-Resolvable) Data length: 31 Flags: 0x1a LE General Discoverable Mode Simultaneous LE and BR/EDR (Controller) Simultaneous LE and BR/EDR (Host) 16-bit Service UUIDs (complete): 1 entry Apple, Inc. (0xfd6f) Service Data (UUID 0xfd6f): f47698ff9243617d917ac521b5fcfd436afdb285 RSSI: -86 dBm (0xaa) > HCI Event: Vendor (0xff) plen 18 23 79 54 33 77 88 97 68 02 01 15 30 c0 1f 9a 01 #yT3w..h...0.... 00 00 .. Device coming back: > HCI Event: Vendor (0xff) plen 18 23 79 54 33 77 88 97 68 02 01 95 b9 0b 32 22 2a #yT3w..h.....2"* 00 01 .. > HCI Event: LE Meta Event (0x3e) plen 43 LE Advertising Report (0x02) Num reports: 1 Event type: Non connectable undirected - ADV_NONCONN_IND (0x03) Address type: Random (0x01) Address: 2A:22:32:0B:B9:95 (Non-Resolvable) Data length: 31 Flags: 0x1a LE General Discoverable Mode Simultaneous LE and BR/EDR (Controller) Simultaneous LE and BR/EDR (Host) 16-bit Service UUIDs (complete): 1 entry Apple, Inc. (0xfd6f) Service Data (UUID 0xfd6f): 0b861791a0fb7adcf8b45f951f7d4b7c7fc8e3fd RSSI: -27 dBm (0xe5) Regards Marcel