All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archie Pusaka <apusaka@google.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>
Cc: CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
	Archie Pusaka <apusaka@chromium.org>
Subject: [Bluez PATCH 3/3] doc: Add Name Resolve Fail flag in device found event
Date: Thu, 11 Nov 2021 19:54:54 +0800	[thread overview]
Message-ID: <20211111195423.Bluez.3.I29367ca288fc8f4fcc3b4063425b791501c6534c@changeid> (raw)
In-Reply-To: <20211111195423.Bluez.1.I9fc087b25433a9347b2d8c8ff7a25fadf448ef49@changeid>

From: Archie Pusaka <apusaka@chromium.org>

Userspace should use this new flag to decide whether to do the remote
name resolving or not, by sending Confirm Name MGMT command and set
the appropriate flag.

This patch also extends the Confirm Name command by allowing userspace
to send 0x02 to show it doesn't care about the peer devices names.
---

 doc/mgmt-api.txt | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 97d33e30a1..e4c8de39f0 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -1493,7 +1493,7 @@ Confirm Name Command
 	Controller Index:	<controller id>
 	Command Parameters:	Address (6 Octets)
 				Address_Type (1 Octet)
-				Name_Known (1 Octet)
+				Name_State (1 Octet)
 	Return Parameters:	Address (6 Octets)
 				Address_Type (1 Octet)
 
@@ -1506,10 +1506,11 @@ Confirm Name Command
 		1	LE Public
 		2	LE Random
 
-	The Name_Known parameter should be set to 0x01 if user space
-	knows the name for the device and 0x00 if it doesn't. If set to
-	0x00 the kernel will perform a name resolving procedure for the
-	device in question.
+	The Name_State parameter should be set to 0x00 if user space
+	doesn't know the name for the device to make the kernel
+	perform a name resolving procedure for the device in question.
+	Otherwise, set to 0x01 if user space already knew the device's
+	name, or 0x02 if it doesn't care.
 
 	This command can only be used when the controller is powered.
 
@@ -4089,6 +4090,7 @@ Device Connected Event
 		1	Legacy Pairing
 		2	Reserved (not in use)
 		3	Initiated Connection
+		4	Reserved (not in use)
 
 
 Device Disconnected Event
@@ -4263,6 +4265,7 @@ Device Found Event
 		1	Legacy Pairing
 		2	Not Connectable
 		3	Reserved (not in use)
+		4	Name Resolve Fail
 
 	For the RSSI field a value of 127 indicates that the RSSI is
 	not available. That can happen with Bluetooth 1.1 and earlier
@@ -4285,6 +4288,11 @@ Device Found Event
 	accept any connections. This can be indicated by Low Energy
 	devices that are in broadcaster role.
 
+	The Name Resolve Fail flag indicates that name resolving
+	procedure has ended with failure for this device. The user space
+	should use this information to determine when is a good time to
+	retry the name resolving procedure.
+
 
 Discovering Event
 =================
-- 
2.34.0.rc0.344.g81b53c2807-goog


  parent reply	other threads:[~2021-11-11 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 11:54 [Bluez PATCH 1/3] Listen and process remote name resolving failure Archie Pusaka
2021-11-11 11:54 ` [Bluez PATCH 2/3] device: Save remote name request attempts into cache file Archie Pusaka
2021-11-11 11:54 ` Archie Pusaka [this message]
2021-11-11 16:35   ` [Bluez PATCH 3/3] doc: Add Name Resolve Fail flag in device found event Marcel Holtmann
2021-11-12  3:10     ` Archie Pusaka
2021-11-11 12:45 ` [Bluez,1/3] Listen and process remote name resolving failure bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211111195423.Bluez.3.I29367ca288fc8f4fcc3b4063425b791501c6534c@changeid \
    --to=apusaka@google.com \
    --cc=apusaka@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.