Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp624157ybm; Thu, 28 May 2020 11:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkdDoODuNy8DKKM8qs32iYBSiuQ079VB3pyUMXu94UidV68WSmxW9ORRCsA4u+/qnbBJFP X-Received: by 2002:a1c:4405:: with SMTP id r5mr4709478wma.72.1590688938292; Thu, 28 May 2020 11:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590688938; cv=none; d=google.com; s=arc-20160816; b=tL0eBnmMGDAL+du/ZQDYf4YJ6LrAD0T/MJmAbd7Pe6S8jxNgqAt0xPhpDJhC6IskDK Cj4ui6tMCRGMZFZadWcrH9dUdv7HM51xBpVaVelp8/jVJMpFVwWjvwJX2tcI0CCA5CXQ cw7UkxBVU/bznEkc1kddl3zE7SpKGHBDQgTU/9Jow2VlUoIpCIyZQH+tIVB3XZNWuDWG TXIdlVQcdZfl255P7nfMLiLN3QFwEdIDjpyFUWyPvdIY0GX8ccdX8HS8KMxoDoPtEQCs MdC83VVa7Yh32XUn09gJtEn+dAllB31NXolylyxz+GcLVBito7LrF1JgwZoVvCih3e15 UR9Q== 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:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=j4F/gMQyPo6q3riFk5Nq6zOGcznBYvX2QrqI7xvvLe0=; b=HXn760CZEs6Mc1lRLG9AbIYA1GgILaeDNN0PdEuQK3cqlu1n2sMMoH7dZoEt9vyICk Q2nec+53hmCST2B5OdiDjZpfe9zedbaZ/VP62sfp2s6xHJmL9QZdsVOh+Ecep3vIJQns oQlT9w/EwS0s8sbC13NHW7YIESB2Fof60Be4ZPv4pxb4pLoEIWbhubq2PLiR7VlyOT/I O4WgQLx77q2q0jHe9qnt30+oCocD6x735K9rFjw9v5+WwyUZ3/RHdFdVOYhpkO2n7/x6 jqYo9qS5wz2yeRGraq6RsaconBvE1xgIv9Ur8WrrDpJrjYmJGVoxngWNFpp2I4OBA8Qp mkDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 ov4si4423421ejb.237.2020.05.28.11.01.51; Thu, 28 May 2020 11:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391304AbgE1SBn (ORCPT + 99 others); Thu, 28 May 2020 14:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388240AbgE1SBm (ORCPT ); Thu, 28 May 2020 14:01:42 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 536B5C08C5C6 for ; Thu, 28 May 2020 11:01:42 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jeMqa-0051Vp-Cx; Thu, 28 May 2020 20:01:40 +0200 Message-ID: <7406af4a9e852d99735e1b1af63deed2f0c5d703.camel@sipsolutions.net> Subject: Re: iwlist scanning: how to exclude old scan results from output? From: Johannes Berg To: Bruno Dantas , linux-wireless@vger.kernel.org Date: Thu, 28 May 2020 20:01:38 +0200 In-Reply-To: <99c4ece3-15ca-42cb-aa09-c86d466d6429@www.fastmail.com> References: <(sfid-20200528_174911_413757_32DBA783)> <99c4ece3-15ca-42cb-aa09-c86d466d6429@www.fastmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2020-05-28 at 12:48 -0400, Bruno Dantas wrote: > > You should use 'iw' instead of 'iwlist', which does have options for > > flushing the cache. > > Thank you, Johannes. > > I tried iw but it has the same issue (the "AndroidAP-bd" SSID is > non-existent because my phone is physically turned off, Well, that _should_ work. > but it shows up in the output): > > $ sudo iw dev wlan0 scan flush > ... > TSF: 42037885 usec (0d, 00:00:42) > freq: 2412 > beacon interval: 100 TUs > capability: ESS Privacy ShortSlotTime (0x0411) > signal: -31.00 dBm > last seen: 11447 ms ago Does it go away if you wait long enough for the "last seen" to go above 30 seconds (30000ms)? You should use "iw wlan0 scan dump" (no need for sudo, and don't scan again) to check. Because if not, then there's a bug in the references, and the entry is just being kept alive by ... something. Did you previously connect to it? Does it also happen if you never connect? Then I guess we'll need to know what the kernel version is too. :) johannes