From patchwork Wed Aug 14 18:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 819230 Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D27A63BBCB for ; Wed, 14 Aug 2024 18:57:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723661840; cv=none; b=CshdXqAmTwkMgzyEi8iIIt6t3jN0FC1tnhCh9580cScaKeCrGtUSX0R5sgwQbDO03n3O4jZ7JGOg7X0Gep8IzrJ3GKoRV6XH+eChUlJYt7rLnKyEwwSh/UdJPp9a433os7OIDWUOAWTHHHZ6jJ/QhME47L8s0b4vmSS83iaMn0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723661840; c=relaxed/simple; bh=RdUYRN6YHoR37RGJXU+bPEQrIz5LtBbf9ft9lMFtN2s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=qpNdishkF1byRjX1IwbADbzvRL6I8NP0KVb23jSvCXBPv7XZc2s/nv4nATnSDuocegnOwLgQtyaiyi1hOPqhJccWKNBC8hiGP3Fp0CSML0vnh8J42OE1RYw2evyXEPslIWakMRwdgW8XZ298CXXZBWD3E8j2mt3wJkJ2j1JrOEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bcmFsYUH; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bcmFsYUH" Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-6659e81bc68so3462277b3.0 for ; Wed, 14 Aug 2024 11:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723661837; x=1724266637; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Gs5hcx50K/4GDfEhlq9Mtn9nrSkclyLWMelqFWjSiOs=; b=bcmFsYUHAisyk4Fti0p/ypT3l6mpX3TdncXRsEU6AQpTVxIAyaFIAyTUT8Ndrz/c56 0WDcU7/43AagBg/28+qD/4ffN7w4+9vVz9kNz1R8eCfvMs0y++I7PsK0lMHGODOWd/nZ mQt64fjvA+fFyaKjFkyfuV9tBPFJEVRxzZak1BoXp+xWJ0VrNf9jLBoYUyskQtsMNjEv RJf5kXjE9FfeK1fUi+mg5zfGRJN5wm+vDAjI0onoGkTIpQaJMbcNcXBoddqUE/0/gLUg S+hFkOcNcvNm8xCv6wdgmnWPkZ/EslGCUsir7mHtAV5EjP1PNTR+k1/taNR0yucbzYXY A1Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723661837; x=1724266637; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Gs5hcx50K/4GDfEhlq9Mtn9nrSkclyLWMelqFWjSiOs=; b=qaej7255G5trDG6mNFLyITjbaOf7wY+zFXEWU8yKobI/ri6JCOVaKtYF7nbMiulzt3 tm0aVPZwYo9fPwoF+ciTTyIHD2QJllDyQ24LFpn3cbdwT6h6BB2IsP1ibKmsXUhxqm8Z 43rz3JlzA1uJLHoswmlquFBTD54gS/wdKv90BhmyC8kmeJDV/Q1B8paKwDhqvnKalrwM ueWJ6YtfZCJDGHGsvVnlBO3YFlewkejGVvhbGQ5mIIBSXGsCpoDQxZLpCcjtXdAmDusr CQ8HCERG+5MYqHeai3ShYYyNAqmb+OUwIcL4KAfOJfc/CIM912oRqHO+Pc+1faeX7y30 ioGw== X-Gm-Message-State: AOJu0Yy1z0o+9c8dm8OTRU7KjtcMhliI5bwTHdyzREF2AadpsUvA3e5D kXxUbZKKRHg09jMXIsyN9CCV+4p+Yk5fBfcTS95SXl+uZa7K5CNoX5fsyJtc X-Google-Smtp-Source: AGHT+IECkZXWS/Pqw3CRObg9AB7+AIx93dwt5zBudzep8Kny5SdyW8RJZqv568DSlhRlHOtIsyEUGQ== X-Received: by 2002:a05:6902:2507:b0:e0b:ea37:9c36 with SMTP id 3f1490d57ef6-e1155aad738mr3598165276.18.1723661836788; Wed, 14 Aug 2024 11:57:16 -0700 (PDT) Received: from lvondent-mobl5.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e116203d02fsm274037276.48.2024.08.14.11.57.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 11:57:15 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 1/2] device: Promote Device.{AdvertisingData, AdvertisingFlags} to stable Date: Wed, 14 Aug 2024 14:57:13 -0400 Message-ID: <20240814185714.844117-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz This promotes AdvertisingData and AdvertisingFlags to stable so they can be used by upper layers without having to enable experimental. --- doc/org.bluez.Device.rst | 8 ++++---- src/device.c | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/org.bluez.Device.rst b/doc/org.bluez.Device.rst index 4fdb31b0acbe..f94fc21296a9 100644 --- a/doc/org.bluez.Device.rst +++ b/doc/org.bluez.Device.rst @@ -293,13 +293,13 @@ bool ServicesResolved [readonly] Indicate whether or not service discovery has been resolved. -array{byte} AdvertisingFlags [readonly, experimental] -````````````````````````````````````````````````````` +array{byte} AdvertisingFlags [readonly] +``````````````````````````````````````` The Advertising Data Flags of the remote device. -dict AdvertisingData [readonly, experimental] -````````````````````````````````````````````` +dict AdvertisingData [readonly] +``````````````````````````````` The Advertising Data of the remote device. Keys are 1 byte AD Type followed by data as byte array. diff --git a/src/device.c b/src/device.c index cf7264051ac2..1a5e8a7caa27 100644 --- a/src/device.c +++ b/src/device.c @@ -3252,11 +3252,9 @@ static const GDBusPropertyTable device_properties[] = { dev_property_exists_tx_power }, { "ServicesResolved", "b", dev_property_get_svc_resolved, NULL, NULL }, { "AdvertisingFlags", "ay", dev_property_get_flags, NULL, - dev_property_flags_exist, - G_DBUS_PROPERTY_FLAG_EXPERIMENTAL}, + dev_property_flags_exist }, { "AdvertisingData", "a{yv}", dev_property_get_advertising_data, - NULL, dev_property_advertising_data_exist, - G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, + NULL, dev_property_advertising_data_exist }, { "WakeAllowed", "b", dev_property_get_wake_allowed, dev_property_set_wake_allowed, dev_property_wake_allowed_exist }, From patchwork Wed Aug 14 18:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 819548 Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CD611BD4FD for ; Wed, 14 Aug 2024 18:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723661842; cv=none; b=bQ4Y+jBtsQHgzIZ/6owDGdyBaOnIST0bXsAdXTYdDb+ZnTLwdHcEZwQFLiBMvbaz24N6E6tws80bWAqtYqIpdigmo/t5rCetfzbGcic7tLXp8n0iBWsWPcWpfLGEqLCCsppxZw7srmTo4Vf7/owtSQazpBpV6Xs4+XrjkVWQLbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723661842; c=relaxed/simple; bh=Oa22wE+1XQT8CkBwoxvgIDRzi1JRgLavjn2h3O9bGV4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YuurzmKY2SHPq/RmXWNKeNIHFz2PTL8L6AiaCgE0m7km5l9N16PWAPl5c5nDqPs1HOiS//DfaC1hahPCT7Rn5cLzcs4j4hGuxhmPBOPEnvGPuvC87L3FTG23bKur9wv7AOxskB22XQz/3mNX0VomWjTtl8JOOZEA9JpJkRW0vTQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K1jqJtJb; arc=none smtp.client-ip=209.85.219.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K1jqJtJb" Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-e0ea24477f0so279890276.2 for ; Wed, 14 Aug 2024 11:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723661839; x=1724266639; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9/+2ykAsZXMD/eMp2tl+lU5moR3JfSXuySPNNKdybvk=; b=K1jqJtJbnXhr9JoCb1kczuETtU7tVzYg8gR/oTp6tcdiwFpuFtRiaHRdHbANWlIz8v +jehorE0xDIc00PXRfSfGE32PkzkCvrnrfJWOg8uf0IRG3rILgYonHNQwhlFetmRfSUu 74JuaJb7+Ema28+PQdnhkoqjRLFaWNrTItiIeFnH7byDsk0j4bGkUtQiPPAJSksBuxzW 7MNTkpqqIQsgowGXC/lz9j7ga4E/EpqFMProFB8nnBKAbpsZ3YwKUpYH1/m9DAcfl8hn O43HxcJVXz8DafDawjERQMLo1ACQv1zuJSaxjl/NEKflUywEpDYUMcma898Qi7Gf7bWl 8PBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723661839; x=1724266639; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9/+2ykAsZXMD/eMp2tl+lU5moR3JfSXuySPNNKdybvk=; b=cZeM4OHfD0/xRFjgkZSEAgcfJpm4EXW+u4kU8qMsku1HcOD96u+6477/kNTBHcxqxv c0c3O79nPxpGvMeAJUBoJ5LBwXl6nchu+VstdHwiR39udSjad4Na7L7NH0qSfK1PeUhg uHa2QY++t3jhrTIEeOlGdBM94uj+krWV8fiAAW0g0io75AJiRI4Pvo1ZWtOAISMbiTi8 OG8LfgdoZp+ZzIyE4Z65sTyPu8pMp5bushBkbrJ2TS7JcKkKpu/GNGoQmUCwUiEIA/k+ QSbCXCQQYmoXmsi6Y2LJR/iirchO4pPio3AFj7wfu+1DlUdW9O9DsWL0x+lf4W0F0D9Y Ucvg== X-Gm-Message-State: AOJu0Yy+9rkdo8fGHO7OH/TOulpNsjtTeiRlOgaA4udn4XwHZ3cMQCoy VF4Xg745GUlyte4WU/0Xb8Qd8OSTmCQZGY7m3Cd5vA/f2NMloewo89kRj8q/ X-Google-Smtp-Source: AGHT+IGvLN3VLJyd0D3VXFNo0LVxkDoDOZxUmhRlTz4Fwv1hZ0t7m4WHuN4eLOE2OFrSla6GSiJLYg== X-Received: by 2002:a05:6902:919:b0:e08:6373:dfb3 with SMTP id 3f1490d57ef6-e1155a48191mr4889462276.1.1723661838777; Wed, 14 Aug 2024 11:57:18 -0700 (PDT) Received: from lvondent-mobl5.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e116203d02fsm274037276.48.2024.08.14.11.57.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 11:57:17 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 2/2] adapter: Create devices if they are connectable Date: Wed, 14 Aug 2024 14:57:14 -0400 Message-ID: <20240814185714.844117-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240814185714.844117-1-luiz.dentz@gmail.com> References: <20240814185714.844117-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz Rather than just depend on discoverable also check if the device is considered connectable since upper layers shall now be able to use AdvertisingFlags to detect when a device shall be considered visible or not and bluetoothctl has been using it since commit 815f779aa8e4 ("client: Use AdvertisingFlags when available"). --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 85ddfc16568f..245de4456868 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -7293,7 +7293,7 @@ void btd_adapter_device_found(struct btd_adapter *adapter, MGMT_SETTING_ISO_SYNC_RECEIVER)) monitoring = true; - if (!discoverable && !monitoring && !eir_data.rsi) { + if (!discoverable && !monitoring && not_connectable) { eir_data_free(&eir_data); return; }