Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8957827rwb; Tue, 13 Dec 2022 12:46:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jXrk9w/+FqkNfNdzOprQS6iK2VgmkqGOwZ+JIQyB/Zm4iwFfkW27UHfcovJr3xqFt/duU X-Received: by 2002:a17:902:f211:b0:189:8f64:deac with SMTP id m17-20020a170902f21100b001898f64deacmr20964608plc.2.1670964388035; Tue, 13 Dec 2022 12:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670964388; cv=none; d=google.com; s=arc-20160816; b=DwgCTKlo4EH+buPrr2/U4U2hPVTCOjMAgWK2RAialRXEm4IVeOyqW7+omrKMPNf/tI 38xj36ubRtwALO2bukc8BOK010Bx5wLQUbnrdGaSJELdy4YfLmaioiq9LZ3SM+Yjti9f mkGrjzRwF9g0NmJwP18/52srBcVcHwSeODuHkqKzrkfnakEMqkg9LA9PEpuiINsWMggX XLv0jdciAXMql3Nv9ypkhX98dbi/g3QI08wU07MMaz1pYd+66DN34C8sp4lW43wf0R7l /XhHNfHaL+NY/NlNN1DXk1myQpBJMSHwzDZNAlmyzgw6SQ664nE2y3bxIAmP06mVpguX Nynw== 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=M3sq4fxhcYlr1zbE3/huyoAG2H+acQ6TXRgmL9+VhUY=; b=xdqZbifz0X1YopSq1YzMEE9QhlnsC0hWRlz0VGqwqR+7IpeINKFkrPD15uWQipX1yg kAVFhb0iYuWe3X5j5tFC3kulM3JyBrUhywEEBaeQv7b04edC6tklWFUtrqinpMoY5q7m 75OxZ44wyMJM5kaETeuuJCDQzdzhNnXGFu5ER3jHOSvvBbc9gA9Gbu2sTICuInPMhL3r Ip9AX2u03Xkdo06OFiySzj97FFa7CydD30zU6p4757qBKbQwN3jNPGY6yEoU5Nn5vtWz aBPWVAwJy2tsmoARhaEXdvgOAwvQ0ShGni5WMZ557GTg9dwrYijnpc6SeEfhSNcwKF5k Tv4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Xuxp9axW; 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 a2-20020a170902900200b001897bfe1ec1si645362plp.345.2022.12.13.12.45.43; Tue, 13 Dec 2022 12:46:28 -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=@gmail.com header.s=20210112 header.b=Xuxp9axW; 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 S236899AbiLMUpl (ORCPT + 99 others); Tue, 13 Dec 2022 15:45:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236891AbiLMUpj (ORCPT ); Tue, 13 Dec 2022 15:45:39 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09D8B1402A for ; Tue, 13 Dec 2022 12:45:38 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id b3so6959429lfv.2 for ; Tue, 13 Dec 2022 12:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=M3sq4fxhcYlr1zbE3/huyoAG2H+acQ6TXRgmL9+VhUY=; b=Xuxp9axW99Bu8ruVFkJepcenkG5uom7spXl9ygDmpLk4H/x6odwJZaShNEehWRtbfD aAuLCSAxDIiKQhwjpecwdcuQHkw8VCaLCZvwXNwrvXbxTtkfcSej5Tq2vQ5ZIOi/yir0 XTMYGniy0q1bfRNkQCIs14FNgaPJ8rpfpVWc5kxyRf8qve8goSsZAgV8N9Dtaq9+YmW5 XGGCOm3mLaWGctUqTJwNlzYERSj5eExKSgBKpjW1gUtYwt0JbjGHNrjRgcKKOiSy9brj k9xmps5a08paCHgKPYIB4fa2ZghZ3kHd9Qu6K7pbf1GcypRY0OCfwhidewFOHabmQ35H zw1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M3sq4fxhcYlr1zbE3/huyoAG2H+acQ6TXRgmL9+VhUY=; b=PSt4c4m+r6o7ynfMATa7wLmo0D8wIUgTEGwunJd3UDKtEbGvLUcdkKrBtNojlI+P26 y3WyTVv0pc5yTd94eKOzzK7z/UrRu1G5/MhmEZZKJkB7kgjrNIb5YrbvhVYqj1c9cz8A 5NW7u78WYIQeYnUBAe0h2/18Mc/b+M06hKQTA8REX6FNuwhnb/BJjqyCxrgGRUFkM2UI ErtdNDAs4/tthaYNr/my/VoZGKwuyXnz7KRDrMmDrG1Jg5O8cP3xajyGuracpbA5dLfK Cj59aG1+0yZ6SK5jD1LyawNMC+/ZRbxYIohkHPSAIudsIHogJHBCAkR8b0INHQTJY4u3 gZ/Q== X-Gm-Message-State: ANoB5plEjj8C7puch18lVzfQ6cjTrhfLvXXm4fTqM1NPaSkBJKJuTFZZ VFfxVVe8zBsbwDVkqQygjeLIiW1I5G8hQ21F6CisKueIPC/6vh0U X-Received: by 2002:a05:6512:31ca:b0:4b5:5da1:5224 with SMTP id j10-20020a05651231ca00b004b55da15224mr7831933lfe.106.1670964336238; Tue, 13 Dec 2022 12:45:36 -0800 (PST) MIME-Version: 1.0 References: <988dc1f9add28a70ba18ce2f3042aac0bea04b5b.camel@hadess.net> <7dc4-63974a80-14d-24592140@246924754> In-Reply-To: <7dc4-63974a80-14d-24592140@246924754> From: Luiz Augusto von Dentz Date: Tue, 13 Dec 2022 12:45:24 -0800 Message-ID: Subject: Re: [PATCH BlueZ 0/1] Expose the disconnect reason over D-Bus To: Arthur Crepin-Leblond Cc: Bastien Nocera , linux-bluetooth@vger.kernel.org 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 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 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 and 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 argument? > > I chose the easy path by copying the existing code for the device properties > that get updated like the "Connected" or "ServicesResolved". > I am not too familiar with BlueZ signals other than PropertiesChanged, > 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