From: Ludovico de Nittis <ludovico.denittis@collabora.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v3 6/7] adapter: Set server security level in load_devices()
Date: Thu, 24 Apr 2025 17:10:05 +0200 [thread overview]
Message-ID: <be3ecba1-8f13-4b63-9835-e4dc4b375dbe@collabora.com> (raw)
In-Reply-To: <CABBYNZKZoBaw_MzRqmR3CUv+=rw_U=Uo25engjsFG=9u-jU8XQ@mail.gmail.com>
Hi Luiz,
On 4/24/25 4:57 PM, Luiz Augusto von Dentz wrote:
> Hi Ludovico,
>
> On Thu, Apr 24, 2025 at 10:50 AM Ludovico de Nittis
> <ludovico.denittis@collabora.com> wrote:
>> After loading known devices from storage, change the security level if
>> we have a device with `CablePairing`.
>> This will allow it to successfully establish a connection.
>> ---
>> src/adapter.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/src/adapter.c b/src/adapter.c
>> index fd425e6d2..8d875013c 100644
>> --- a/src/adapter.c
>> +++ b/src/adapter.c
>> @@ -68,6 +68,7 @@
>> #include "adv_monitor.h"
>> #include "eir.h"
>> #include "battery.h"
>> +#include "profiles/input/server.h"
>>
>> #define MODE_OFF 0x00
>> #define MODE_CONNECTABLE 0x01
>> @@ -5090,6 +5091,12 @@ free:
>> g_key_file_free(key_file);
>> }
>>
>> + if (btd_adapter_has_cable_pairing_devices(adapter)) {
>> + DBG("There is at least one known cable paired device, setting the "
>> + "listening input server security level accordingly");
>> + server_set_cable_pairing(&adapter->bdaddr, true);
>> + }
> This creates a dependency on the input which is a plugin that can be
> excluded/not loaded at runtime, so we can't really do this at daemon
> core.
Do you have any suggestions on how to shuffle this around to avoid calling
`server_set_cable_pairing()` directly from `adapter.c`? Because in
theory that
should still happen after we ensured we loaded all devices from storage.
>> closedir(dir);
>>
>> load_link_keys(adapter, keys, btd_opts.debug_keys);
>> --
>> 2.49.0
>>
>>
>
next prev parent reply other threads:[~2025-04-24 15:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 14:48 [PATCH BlueZ v3 0/7] Support Sixaxis gamepad with classic bonded only Ludovico de Nittis
2025-04-24 14:48 ` [PATCH BlueZ v3 1/7] src: Add new CablePairing property Ludovico de Nittis
2025-04-24 17:16 ` Support Sixaxis gamepad with classic bonded only bluez.test.bot
2025-04-24 14:48 ` [PATCH BlueZ v3 2/7] client: Print CablePairing property Ludovico de Nittis
2025-04-24 14:48 ` [PATCH BlueZ v3 3/7] sixaxis: Set CablePairing when pairing a Sixaxis with USB Ludovico de Nittis
2025-04-24 14:48 ` [PATCH BlueZ v3 4/7] adapter: Add btd_adapter_has_cable_pairing_devices() Ludovico de Nittis
2025-04-24 14:48 ` [PATCH BlueZ v3 5/7] input: Automatically use sec level low when using a cable paired device Ludovico de Nittis
2025-04-24 14:48 ` [PATCH BlueZ v3 6/7] adapter: Set server security level in load_devices() Ludovico de Nittis
2025-04-24 14:57 ` Luiz Augusto von Dentz
2025-04-24 15:10 ` Ludovico de Nittis [this message]
2025-04-24 15:20 ` Luiz Augusto von Dentz
2025-04-24 14:48 ` [PATCH BlueZ v3 7/7] sixaxis: Set security level when adding a sixaxis device Ludovico de Nittis
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=be3ecba1-8f13-4b63-9835-e4dc4b375dbe@collabora.com \
--to=ludovico.denittis@collabora.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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.