Re: [PATCH BlueZ 0/1] [v2] ExcludeAdapter configuration setting for input plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shawn,

On Tue, Jul 12, 2022 at 12:35 PM Shawn J <shwoseph@xxxxxxxxx> wrote:
>
> I could see going that route, but doesn’t the input plugin register the hid profile on startup? Would RegisterProfile be able to seize the hid profile from the plugin at that point? If it can, I think this would solve the problem as long as it works with sdp. I’m still a little fuzzy on gatt/sdp and I thought profiles were more of a gatt thing.

We may need to do some changes, for instance it is probably better to
make input plugin register its profiles within src/profile.c like we
do with externa profiles, in fact this would probably be a nice thing
to do for every profile actually, so we have a src/profile.c managing
all our sockets instead of each plugin doing its own thing. Regarding
profiles, LE and Classic use the same term but they mean different
things, in LE there are GATT Services (which include attributes, etc)
and then a profile which normally consist of client procedures, on the
other hand in Classic the term Profile is used for both client and
server and uses SDP to declare it, RegisterProfile is actually meant
for Classic/SDP registration while in LE we have RegisterApplication
which has its own object tree to represent GATT services and
attributes.

> On Tue, Jul 12, 2022 at 14:18 Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> On Sat, Jul 9, 2022 at 11:38 AM shwoseph <shwoseph@xxxxxxxxx> wrote:
>> >
>> > As a bluez user I have run into cases where the input plugin can be problematic because it binds both HID PSMs on all bluetooth adapters. Simply disabling the plugin is not an ideal solution if you want to, for example, run an application that binds PSMs 17 and 19 on adapterA while using a bluetooth input device on adapterB. This proposed feature would allow users to determine which of their adapters can be engaged by the input plugin. Using the ExcludeAdapters key in input.conf a comma separated list of bdaddrs can be specified that the input plugin will not start a server on.
>> >
>> > shwoseph (1):
>> >   ExcludeAdapter configuration setting for input profile
>> >
>> >  profiles/input/device.c   | 22 ++++++++++++++++++++++
>> >  profiles/input/device.h   |  4 ++++
>> >  profiles/input/input.conf |  4 ++++
>> >  profiles/input/manager.c  | 34 +++++++++++++++++++++++++++++++++-
>> >  4 files changed, 63 insertions(+), 1 deletion(-)
>> >
>> > --
>> > 2.32.0
>>
>> Well those PSM would require root to bind anyway so if the intention
>> is to allow implementing something like an HID device perhaps we would
>> better off allowing RegisterProfile with HID UUID that way the daemon
>> still have control of these PSMs but it can dispatch the connections
>> to an application that has registered:
>>
>> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/profile-api.txt
>>
>> On the plus side you can register an SDP record for it, but we may
>> need to do some changes if we want profile to be registered only to a
>> specific adapter.
>>
>> --
>> Luiz Augusto von Dentz



-- 
Luiz Augusto von Dentz




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux