All of lore.kernel.org
 help / color / mirror / Atom feed
* UsermodeHID uncertainty
@ 2015-07-13 16:43 Mike Purvis
  2015-07-15 15:10 ` Mike Purvis
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Purvis @ 2015-07-13 16:43 UTC (permalink / raw)
  To: linux-bluetooth

Hi all,

I'm struggling to understand what the UsermodeHID option in BlueZ
does, and I'm not finding a good source of documentation on it. I
understand that using this option has the kernel pass raw HID traffic
to a usermode process for interpretation, rather than doing this
directly in the kernel, and this has advantages as far as
debuggability, pluggability, fault isolation, etc.

However, my questions—

- What is the usermode process? Do I have to start it somehow, or does
it start on its own? Is it an already running daemon?
- What is the communication channel between the kernel and user
process, and how can I listen in on the traffic?
- Is the usermode process directly managing things like devfs nodes
(eg, /dev/input/js0), or does it communicate back to the kernel for
that?
- As a user, what are my options for swapping out the usermode process
if I want to modify its behaviour? For example, handling disconnects
or pairing in a different manner than the default?

Thanks for any pointers or thoughts,

Mike

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

* Re: UsermodeHID uncertainty
  2015-07-13 16:43 UsermodeHID uncertainty Mike Purvis
@ 2015-07-15 15:10 ` Mike Purvis
  2015-07-16 12:47   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Purvis @ 2015-07-15 15:10 UTC (permalink / raw)
  To: linux-bluetooth

> - What is the usermode process? Do I have to start it somehow, or does
> it start on its own? Is it an already running daemon?
> - What is the communication channel between the kernel and user
> process, and how can I listen in on the traffic?
> - Is the usermode process directly managing things like devfs nodes
> (eg, /dev/input/js0), or does it communicate back to the kernel for
> that?
> - As a user, what are my options for swapping out the usermode process
> if I want to modify its behaviour? For example, handling disconnects
> or pairing in a different manner than the default?

Any thoughts on these questions?

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

* Re: UsermodeHID uncertainty
  2015-07-15 15:10 ` Mike Purvis
@ 2015-07-16 12:47   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2015-07-16 12:47 UTC (permalink / raw)
  To: Mike Purvis; +Cc: linux-bluetooth

Hi Mike,

On Wed, Jul 15, 2015 at 6:10 PM, Mike Purvis
<mpurvis@clearpathrobotics.com> wrote:
>> - What is the usermode process? Do I have to start it somehow, or does
>> it start on its own? Is it an already running daemon?

bluetoothd will be in charge since after all UserspaceHID (not
UsermodeHID) is part of its input.conf.

>> - What is the communication channel between the kernel and user
>> process, and how can I listen in on the traffic?

It communicates using uhid/uhid2, check Linux Documentation for more
details. You can listen the L2CAP traffic using btmon, hcidump or
wireshark, but they probably wont decode the HID protocol

>> - Is the usermode process directly managing things like devfs nodes
>> (eg, /dev/input/js0), or does it communicate back to the kernel for
>> that?

Nope, uhid does that in the kernel, bluetoothd only forward the
descriptors it gets over L2CAP.

>> - As a user, what are my options for swapping out the usermode process
>> if I want to modify its behaviour? For example, handling disconnects
>> or pairing in a different manner than the default?

bluetoothd will take care of paring, etc, of course you can change the
logic by changing BlueZ's source code, but be aware things like paring
is subject of Bluetooth Qualification which is something BlueZ has
passed many times.




-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2015-07-16 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 16:43 UsermodeHID uncertainty Mike Purvis
2015-07-15 15:10 ` Mike Purvis
2015-07-16 12:47   ` Luiz Augusto von Dentz

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.