Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4111451iog; Tue, 21 Jun 2022 12:15:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1svaRKJGYST+c3HJSasGvPp1od5UjUToqMTSQi08LcD5QyPrRCyyLZROlI0Rl8iSMHZYGQu X-Received: by 2002:a17:906:5253:b0:711:ee52:764e with SMTP id y19-20020a170906525300b00711ee52764emr26749050ejm.171.1655838923476; Tue, 21 Jun 2022 12:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655838923; cv=none; d=google.com; s=arc-20160816; b=rcRlpvxK8A83A349t2z+iZeqsdxmJPprxeLQrj5wRU+C41T/D6Jz1rd3D5c+3i8B3S KEWWQv2Hr7u4Vuff4nl7qbtiApwIYPkn54asObRXcder8HlZmMoqtQlku7KuZYknjrzC GI4Dulv7B2IdAbm/Sntr1xD2oz4P6MS+8Y8/bZMBw4zRtOzfp2Oy7NiRONmG8tB/j6qR UpeEIHRETARyGBZNLjhO+eu3t+QqyW1uVZVf8cQQ6MLGedtbkLcFt5KBXgvfb0Q6tF/C KqL8ATaLB+mIM3U4Y+R6j2StiCUNPw/daeBbwpd+lnwywKVCDUDHv/h69ls5Vu4b6DlX 9jHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A7eBesiERH0JVmkcMi1fBa7JsyR5GPtjmf/w4neP6a4=; b=luzEUvXQwWxkTdhF6loL+SyPKi7a7SjvY8Q2h+WTztpxp4Z6ZTBPSwbH9o+JLQGZHU yFti2V7xLN48++1OB81eHUlg41eCJVqKgy65kOPPYItK9PwgDIq2AdzW7xJVFLBvQa4T lsBcvsH2CPe0vD26/MeAvZFSDP0e/gSAgQ+n1SNxLk4Pjfb30oVDrj56ybpaDLxirmis ufXF7s9VtmvXx9g6qRtRbj20PGrIGSukidGqRqdpikeWaKMS7rS0lXONCBSEftDo+cLw euM87FKHdzmLyKeRzMVJc/mQSat7xH2jxKsCMcGU9KnRvU8SAvgnR4FHKbtlTm3xJ2kT As4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CzeEYkzD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm15-20020a170907948f00b007122fe7f49csi11705293ejc.424.2022.06.21.12.14.56; Tue, 21 Jun 2022 12:15:23 -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=pass header.i=@gmail.com header.s=20210112 header.b=CzeEYkzD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiFUTNp (ORCPT + 99 others); Tue, 21 Jun 2022 15:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiFUTNo (ORCPT ); Tue, 21 Jun 2022 15:13:44 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE83B13E09 for ; Tue, 21 Jun 2022 12:13:43 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id a2so23983390lfg.5 for ; Tue, 21 Jun 2022 12:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A7eBesiERH0JVmkcMi1fBa7JsyR5GPtjmf/w4neP6a4=; b=CzeEYkzD2YW1onhb2PHWD5qY08xBS8trahyBdD20NntMb7Q1BoTHomUSHMvQVd8JBG Siid2uB44zsl+4qZrNiieF4xYfsSlEtEVFwGIQZiVOsxXuTa5EHRsnA/1zBLKb45u+93 DKzpaF2l4JgKIG4DdxC8/WUolqvM5A8AeuyFN6C9tplNfOuq/8UFwhbTw18TVCYiOOec SbSMBoylRa6parKId2tcexZKjY6t8F2YKa487dQ4AZ8IXDZm8pAFayRNULVFn/duGI5M 2nLznro+g/VfECf8vq3Q+gOF47Ud7om27mexOwoLc0MLRaqEjh1tISXjJlbr/EKJSZpM u3NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A7eBesiERH0JVmkcMi1fBa7JsyR5GPtjmf/w4neP6a4=; b=scyi1EJM8tOOrLfmBLIAIGrgZieyWCtws49sT9t7LeoaXpFKwXj+8vfFfX/WBTxnnb eA4WRu5RM1BAldFmgnsZUFILgj2oIWDLBTWU8EE8LJ525YbKrsYHSwb3u1DbcSbTWD7z wYrA0dTjQnsJiu2tV0YpzobqcAUbgscJhAfd0fdWLBQvt4A93gn4WaPODOF9/j7G7Dwy hp7xn25XOobSjJ+8RsU1XFlsdjTzRqzyyBhV8etTxmetBVKvhA1cZOGg/sL/4YM9ZhFA 9T0NYz/e6pnkMH6Mmtl8P0UHv47CsJWdkxMQjmMWEeDFO2TBq+XHn4WvmbKvZAAol9fK 8qCQ== X-Gm-Message-State: AJIora/IsNoQz2v8UStnwrJ7HXaOmJ3lsAwI6xWgljRDRtG5hf/vrNIK I3WYJBs+vWkqaGIhbDtkJSyWZrTv9srPLgzmo80= X-Received: by 2002:a05:6512:2204:b0:479:7c21:bff8 with SMTP id h4-20020a056512220400b004797c21bff8mr17702261lfu.251.1655838822102; Tue, 21 Jun 2022 12:13:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Tue, 21 Jun 2022 12:13:30 -0700 Message-ID: Subject: Re: [BUG] Use of gatttool causes scan to stop (permanently?) To: John Klug Cc: "linux-bluetooth@vger.kernel.org Bluez Kernel" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 John, On Tue, Jun 21, 2022 at 12:00 PM John Klug wrote: > > I am using 5.4.199 currently with bluez 5.64 on an arm 32. The same problem occurs in earlier versions and kernels. > > In bluetoothctl after the issue occurs the "show" command always says: > Discovering: yes > > And no scan data follows, even though we have many devices. > > I have tried turning on duplicate data with bluetoothctl. > > I see (manually typed in): > [bluetooth]# scan on > SetDiscoveryFilter success > [bluetooth]# scan off > Failed to stop discovery: org.bluez.Error.InProgress > [bluetooth]# scan on > Failed to start discovery: org.bluez.Error.InProgress > [bluetooth]# scan off > Failed to stop discovery: org.bluez.Error.InProgress > [bluetooth]# scan on > Failed to start discovery: org.bluez.Error.InProgress > [bluetooth]# scan off > Failed to stop discovery: org.bluez.Error.InProgress > Failed to start discovery: org.freedesktop.DBus.Error.NoReply > > gatttool can still connect and retrieve data. > > btmon shows no activty except from gatttool, and none from scan > > Here is a snippet of debug from bluetoothd: > > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > agent.c:agent_disconnect() Agent :1.1113 disconnected > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > agent.c:remove_default_agent() Default agent cleared > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:set_mode() sending set mode command for index 0 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > agent.c:agent_destroy() agent :1.1113 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > agent.c:agent_unref() 0x13285c8: ref=3D0 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:discovery_disconnect() owner :1.1113 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:discovery_remove() owner :1.1113 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:discovery_free() 0x1321050 > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:update_discovery_filter() > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:discovery_filter_to_mgmt_cp() > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:trigger_start_discovery() > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:cancel_passive_scanning() > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:start_discovery_timeout() > Jun 21 13:33:30 ecc8 daemon.debug bluetoothd[32170]: ../bluez-5.64/src/= > adapter.c:start_discovery_timeout() adapter->current_discovery_filter > > Do you have any suggestions for further research into this problem? Don't use gatttool, which has been deprecated, instead use bluetoothctl (menu gatt) for GATT operations. > John Klug -- Luiz Augusto von Dentz