linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bluetoothctl set-alias - how to select the device
@ 2022-01-25 15:56 Dave Mielke
  2022-01-25 23:18 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Mielke @ 2022-01-25 15:56 UTC (permalink / raw)
  To: Linux Bluetooth

Hi:

It isn't clear to me how bluetoothctl set-alias decides which device to rename. From a bit of a look at the code, it seemed like it might be the most recent connect, but that proved to be an incorrect conclusion. In the same way that select can be used to pick the active controller, is there a way to explicitly pick the active device?

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave@Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bluetoothctl set-alias - how to select the device
  2022-01-25 15:56 bluetoothctl set-alias - how to select the device Dave Mielke
@ 2022-01-25 23:18 ` Luiz Augusto von Dentz
  2022-01-26  0:43   ` Dave Mielke
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-01-25 23:18 UTC (permalink / raw)
  To: Dave Mielke; +Cc: Linux Bluetooth

Hi Dave,

On Tue, Jan 25, 2022 at 2:55 PM Dave Mielke <Dave@mielke.cc> wrote:
>
> Hi:
>
> It isn't clear to me how bluetoothctl set-alias decides which device to rename. From a bit of a look at the code, it seemed like it might be the most recent connect, but that proved to be an incorrect conclusion. In the same way that select can be used to pick the active controller, is there a way to explicitly pick the active device?

It only works while connected currently, we could in theory extend the
command to have an optional 2 parameter so one can enter an address.

> --
> I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
> Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
> EMail: Dave@Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
> Phone: +1 613 726 0014 | Canada  K2A 1H7   |



-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bluetoothctl set-alias - how to select the device
  2022-01-25 23:18 ` Luiz Augusto von Dentz
@ 2022-01-26  0:43   ` Dave Mielke
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Mielke @ 2022-01-26  0:43 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Linux Bluetooth

[quoted lines by Luiz Augusto von Dentz on 2022/01/25 at 15:18 -0800]

>It only works while connected currently, 

Even then, it's unpredictable when more than one device is connected. In my case, for example, it can be my Bluetooth speaker as well as a braille device. I assumed, at first, that maybe it's the most recently connected device, but that, too, wasn't true. When I connected the second device it still changed the alias of the first device.

>we could in theory extend the command to have an optional 2 parameter so one can enter an address.

That, I think, would be very helpful. As I understand it, isn't set-alias only updating local (host-resident) data anyway? Also, given that set-alias isn't predictable anway when more than one device is connected, I think there definitely needs to be a way to explicitly say what one is wanting to do.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave@Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-26  0:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 15:56 bluetoothctl set-alias - how to select the device Dave Mielke
2022-01-25 23:18 ` Luiz Augusto von Dentz
2022-01-26  0:43   ` Dave Mielke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).