2020-06-23 09:59:06

by Ordit Gross

[permalink] [raw]
Subject: avoid speaker (br/edr) reconnect

hi all,

our device (audio source) has the capability to connect to audio
speakers (using code that is based on bluetoothctl bluez v5.47).
I understand that the first connection to the speaker is initiated
from our device,
whereas further connections are initiated by the speaker. (still
looking for documentation for that behavior, but have observed it in
hci dump).

When user removes credentials of the speaker on our device, the audio
speaker still connects to us, pair, but mediaControl connects and
disconnects immediately, so we can't open pcm device.

1. What is the recommended way for canceling the auto reconnect of a
speaker to a known device? (is the only way reset speaker? or can
source device do something?)

2. Considering we have removed credentials on the source side, why
does flow get stuck?

any help would be appreciated


2020-06-23 22:18:59

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: avoid speaker (br/edr) reconnect

Hi Ordit,

On Tue, Jun 23, 2020 at 3:01 AM Ordit Gross <[email protected]> wrote:
>
> hi all,
>
> our device (audio source) has the capability to connect to audio
> speakers (using code that is based on bluetoothctl bluez v5.47).
> I understand that the first connection to the speaker is initiated
> from our device,
> whereas further connections are initiated by the speaker. (still
> looking for documentation for that behavior, but have observed it in
> hci dump).
>
> When user removes credentials of the speaker on our device, the audio
> speaker still connects to us, pair, but mediaControl connects and
> disconnects immediately, so we can't open pcm device.

That would mean that a new device object would be created, paired,
etc, but in such case you will need to authorize the profiles
connections if the device is not marked as trusted.

> 1. What is the recommended way for canceling the auto reconnect of a
> speaker to a known device? (is the only way reset speaker? or can
> source device do something?)

If the device was removed locally and the adapter is not marked as
discoverable then the device will not be able to connect, so I suspect
the reconnection happens because the adapter is left discoverable all
the time.

> 2. Considering we have removed credentials on the source side, why
> does flow get stuck?

Will need debug logs in order to determine what is going on, my first
impressions given the description of the problem is that the agent is
not authorizing the profile connection since it appears as a new
device.

> any help would be appreciated



--
Luiz Augusto von Dentz