Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3975500rwj; Tue, 20 Dec 2022 04:37:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hxLft2welIQBQ+SJrp8SMWZHBvXvw0NDBp9Pabeq7yFBSgLEjLA0dbPyfEALO9A51110i X-Received: by 2002:a17:902:e983:b0:189:6457:4e14 with SMTP id f3-20020a170902e98300b0018964574e14mr48287942plb.8.1671539832820; Tue, 20 Dec 2022 04:37:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671539832; cv=none; d=google.com; s=arc-20160816; b=J/Zf4cBkfjMPNXe9Enk4wbUUYf6Jmqi1vwnwGjAWk0G3XSp1K03Hw0lOcKmaTV4sr8 X6ysiYqhWEhD9Jit7Evu55NCuqbEzKE2BehqMfRe2G9oOohiqCZymJKyez/SXJJYQTlZ ateqEJQPVjR6fOP4vRfqh2xbFuCYfKtDr3XN+DxxWwAb3N704N7QNPJCoLV9tpBJC67j myMoZ3qoBmP3Pbn3fF1+gNi1ONA2SAsmeATAyR3MbtDs2N/W6nXNXsL0CYJF6TEjnmst WKt0xMW5j2A7NL38cktRI3XmVFq18YwCTpT0Ym1QfSQLaJ8q2Q/0rSu8otgUbHZBICwI LbBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent:subject :message-id:mime-version:to:cc:date:in-reply-to:from:dkim-signature; bh=jzwW8daCb4crSW17ytKkDU1gASutWgHilecLGlVLNsI=; b=MyJron+TEC2TOg6NmfUBBeZkdre9flwJFN78eOONZdQ1kzvFjryQ/fumggZ9jsh/LD lOvS6pfHKpG80ZEUAg745jdpxFGFV/RiY0jncv2r1UDJIqpMH8YvV9dlARfk8HXaZcg7 cUva6u1lBujP5wiPtJcdHKYGyAY/kNIGFsC3jHg0nBWtvZYu24T/E/91DEYOyZzsKMb8 eKpe5eGOK5SyjE0UAku/DOFGXlGq8Mjc0MVb+cDkc/Yw965dSXH0+nE86FcyHqepmS2O lXf2xuRkiVTFxoNPnI8gGw9pFWxRuWvc/t5izwwQm0H/uFFj+IKyRzsTEKQ90gC+lweM F4zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marmottus.net header.s=gm1 header.b=DsBzgjGk; 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=NONE dis=NONE) header.from=marmottus.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a170902d2c600b001782a6fbc7csi14344268plc.463.2022.12.20.04.36.47; Tue, 20 Dec 2022 04:37:12 -0800 (PST) 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=@marmottus.net header.s=gm1 header.b=DsBzgjGk; 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=NONE dis=NONE) header.from=marmottus.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbiLTMaW (ORCPT + 99 others); Tue, 20 Dec 2022 07:30:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiLTMaU (ORCPT ); Tue, 20 Dec 2022 07:30:20 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BF4138AB for ; Tue, 20 Dec 2022 04:30:17 -0800 (PST) Received: (Authenticated sender: arthur@marmottus.net) by mail.gandi.net (Postfix) with ESMTPSA id 301012000E; Tue, 20 Dec 2022 12:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marmottus.net; s=gm1; t=1671539416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=jzwW8daCb4crSW17ytKkDU1gASutWgHilecLGlVLNsI=; b=DsBzgjGkdf3tKdE0fgMu2fUCT4msSI49Hew3SNg4SkUs11CqjyQUVm86aBqkksSnBRlEZ8 KawXU88oJq2mKHHxMqAs+ccV5pOLiYw8R76MPV8BOhu3rQSy6SFVpz5Gd2MC7l1uzstHxH X1rY3TyaoZlYNpvS1nyDD2TxrZ8NcppJ9TYkfgom259JWd23MrW70/fU2XKF61cNEg5QOl ijXSAPLvreqSz5yv5UbTW9tMG8or74h8YLOPMNwVE2mB7xt3Vt4qSaJrsiTuaHhE+pcPya Na/HFOZmQoO70YJZl0Vqag/bUrPJ7ZOTAyKFK+U6AQCxcBHz5oLxNZjoJqM58Q== From: "Arthur Crepin-Leblond" In-Reply-To: Content-Type: text/plain; charset="utf-8" X-Forward: 127.0.0.1 Date: Tue, 20 Dec 2022 13:30:15 +0100 Cc: "Bastien Nocera" , linux-bluetooth@vger.kernel.org To: "Luiz Augusto von Dentz" MIME-Version: 1.0 Message-ID: <483a-63a1ab00-45b-340fb6c0@10667613> Subject: =?utf-8?q?Re=3A?= [PATCH BlueZ 0/1] Expose the disconnect reason over D-Bus User-Agent: SOGoMail 5.5.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 On Tuesday, December 13, 2022 21:45 CET, Luiz Augusto von Dentz wrote: > Hi Arthur, > > On Mon, Dec 12, 2022 at 7:38 AM Arthur Crepin-Leblond > wrote: > > > > On Monday, December 12, 2022 15:49 CET, Bastien Nocera wrote: > > > > > On Mon, 2022-12-12 at 14:32 +0100, Arthur Crepin-Leblond wrote: > > > > Hello, > > > > > > > > I am trying to expose the device disconnect reason over D-Bus a= nd the > > > > most elegant way I found was to subscribe to the adapter notify= > > > > callback that gives the reason as an argument. > > > > > > Any reason why this can't be a signal with the reason as an argum= ent? > > > > I chose the easy path by copying the existing code for the device p= roperties > > that get updated like the "Connected" or "ServicesResolved". > > I am not too familiar with BlueZ signals other than PropertiesChang= ed, > > InterfacesRemoved/Added. What would you have in mind? > > > > And apologies in advance, it's my first time submitting here, I do = not have > > an advanced knowledge of the BlueZ internals. > > Can you explain what is the use case here? I hope it is not to > reimplement something like the reconnect policy: > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.conf= #n281 > > > -- > Luiz Augusto von Dentz Hi Luiz, No, nothing to do with the reconnect policy. My device (a Raspberry Pi) is acting as a central and is losing randoml= y the connection with a device. So, the use case is purely to be able to have information about the disconnection. -- Arthur Crepin-Leblond