2020-04-21 04:28:10

by Yun-hao Chung

[permalink] [raw]
Subject: Auto-connect after disconnection from user on trusted devices

Hi linux-bluetooth,

Bluez doesn't disable auto-connect for trusted devices even in
device.Disconnect. This causes users can't disconnect from peripherals
unless they untrust the device.

The behavior seems to change into this way intentionally after this change:
https://www.spinics.net/lists/linux-bluetooth/msg72898.html

I would like to understand why this change is needed and what is the
suggestion to disconnect a trusted device.

Thanks.

Howard


2020-04-21 18:13:40

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Auto-connect after disconnection from user on trusted devices

Hi,

On Mon, Apr 20, 2020 at 9:30 PM Yun-hao Chung <[email protected]> wrote:
>
> Hi linux-bluetooth,
>
> Bluez doesn't disable auto-connect for trusted devices even in
> device.Disconnect. This causes users can't disconnect from peripherals
> unless they untrust the device.
>
> The behavior seems to change into this way intentionally after this change:
> https://www.spinics.net/lists/linux-bluetooth/msg72898.html
>
> I would like to understand why this change is needed and what is the
> suggestion to disconnect a trusted device.

This has been there for a while but if I recall correctly the problem
is that we cannot really tell when the auto-connect was disabled,
besides it was not really honoring that in case the daemon is
restarted, etc, so instead of having yet another setting to persist it
was simpler to just use the trust, or block, properties to control
auto-connect which are persisted properly, that said maybe we can make
disconnect auto block the device and then connect to unblock
automatically but I think that having the application set the block
property is probably clearer that we don't want it to be reconnected.

--
Luiz Augusto von Dentz

2020-04-22 15:26:03

by Yun-hao Chung

[permalink] [raw]
Subject: Re: Auto-connect after disconnection from user on trusted devices

Thanks for sharing your thoughts!

On Wed, Apr 22, 2020 at 2:12 AM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi,
>
> On Mon, Apr 20, 2020 at 9:30 PM Yun-hao Chung <[email protected]> wrote:
> >
> > Hi linux-bluetooth,
> >
> > Bluez doesn't disable auto-connect for trusted devices even in
> > device.Disconnect. This causes users can't disconnect from peripherals
> > unless they untrust the device.
> >
> > The behavior seems to change into this way intentionally after this change:
> > https://www.spinics.net/lists/linux-bluetooth/msg72898.html
> >
> > I would like to understand why this change is needed and what is the
> > suggestion to disconnect a trusted device.
>
> This has been there for a while but if I recall correctly the problem
> is that we cannot really tell when the auto-connect was disabled,
> besides it was not really honoring that in case the daemon is
> restarted, etc, so instead of having yet another setting to persist it
> was simpler to just use the trust, or block, properties to control
> auto-connect which are persisted properly, that said maybe we can make
> disconnect auto block the device and then connect to unblock
> automatically but I think that having the application set the block
> property is probably clearer that we don't want it to be reconnected.
>
> --
> Luiz Augusto von Dentz