* is it possible to temporarily not let user mode get hid input event
@ 2014-02-22 16:35 loody
2014-02-22 16:56 ` David Herrmann
0 siblings, 1 reply; 8+ messages in thread
From: loody @ 2014-02-22 16:35 UTC (permalink / raw)
To: linux-input, linux-usb@vger.kernel.org
hi all:
is there any kernel hid module parameter or test program can
temporarily not letting user mode program not receiving hid event?
1. My hid kos are still inserted in.
2. the kernel usb driver is working well; that mean kernel usb driver
still handle interrupt transaction.
I just not want user mode program see the hid event for a while,
Appreciate your kind help in advance,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-22 16:35 is it possible to temporarily not let user mode get hid input event loody
@ 2014-02-22 16:56 ` David Herrmann
2014-02-23 6:52 ` loody
0 siblings, 1 reply; 8+ messages in thread
From: David Herrmann @ 2014-02-22 16:56 UTC (permalink / raw)
To: loody; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
Hi
On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
> hi all:
> is there any kernel hid module parameter or test program can
> temporarily not letting user mode program not receiving hid event?
> 1. My hid kos are still inserted in.
> 2. the kernel usb driver is working well; that mean kernel usb driver
> still handle interrupt transaction.
>
> I just not want user mode program see the hid event for a while,
For each connected HID device, there is a driver bound to it that
reads the events and forwards them to HID core. What you can do, is to
unbind a driver on a given device:
echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
The device-name is the directory name in:
/sys/bus/hid/devices/
The driver name is usually "hid-generic" but can be figured out for
each device by looking at the "driver" symlink in it's directry.
However, this is *really* just meant for debugging. This is not
recommended for anything serious. There is no support for that and if
you don't know what all this does, you shouldn't use it.
There is no proper way to disable a single device in the kernel.
User-space is supposed to control device-access so we probably won't
add such features to the kernel. If you describe your use-case in more
details, we can try to give hints how to get that working.
Thanks
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-22 16:56 ` David Herrmann
@ 2014-02-23 6:52 ` loody
2014-02-23 15:16 ` David Herrmann
0 siblings, 1 reply; 8+ messages in thread
From: loody @ 2014-02-23 6:52 UTC (permalink / raw)
To: David Herrmann; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
hi David:
Thanks for your suggestion.
2014-02-23 0:56 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
> Hi
>
> On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
>> hi all:
>> is there any kernel hid module parameter or test program can
>> temporarily not letting user mode program not receiving hid event?
>> 1. My hid kos are still inserted in.
>> 2. the kernel usb driver is working well; that mean kernel usb driver
>> still handle interrupt transaction.
>>
>> I just not want user mode program see the hid event for a while,
>
> For each connected HID device, there is a driver bound to it that
> reads the events and forwards them to HID core. What you can do, is to
> unbind a driver on a given device:
> echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
> The device-name is the directory name in:
> /sys/bus/hid/devices/
> The driver name is usually "hid-generic" but can be figured out for
> each device by looking at the "driver" symlink in it's directry.
> However, this is *really* just meant for debugging. This is not
> recommended for anything serious. There is no support for that and if
> you don't know what all this does, you shouldn't use it.
>
> There is no proper way to disable a single device in the kernel.
> User-space is supposed to control device-access so we probably won't
> add such features to the kernel. If you describe your use-case in more
> details, we can try to give hints how to get that working.
Sorry for not describing our situation clearer previously,
The problem we met like below
a. once plug in usb hid mouse and fast moving mouse
b. the screen will get blur.
We want to know whether the screen blur is caused by
1. the interrupt frequency of usb mouse is too high for our embedded
system that make video decode slow
2. something wrong between hw cursor and video overlay.
if we can deceive user mode program there is no mouse event, but
kernel usb level still get hid interrupt transaction.
We may clarify whether above 1) conclusion is correct.
Appreciate your kind help :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-23 6:52 ` loody
@ 2014-02-23 15:16 ` David Herrmann
2014-02-24 11:20 ` loody
0 siblings, 1 reply; 8+ messages in thread
From: David Herrmann @ 2014-02-23 15:16 UTC (permalink / raw)
To: loody; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
Hi
On Sun, Feb 23, 2014 at 7:52 AM, loody <miloody@gmail.com> wrote:
> hi David:
>
> Thanks for your suggestion.
> 2014-02-23 0:56 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>> Hi
>>
>> On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
>>> hi all:
>>> is there any kernel hid module parameter or test program can
>>> temporarily not letting user mode program not receiving hid event?
>>> 1. My hid kos are still inserted in.
>>> 2. the kernel usb driver is working well; that mean kernel usb driver
>>> still handle interrupt transaction.
>>>
>>> I just not want user mode program see the hid event for a while,
>>
>> For each connected HID device, there is a driver bound to it that
>> reads the events and forwards them to HID core. What you can do, is to
>> unbind a driver on a given device:
>> echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
>> The device-name is the directory name in:
>> /sys/bus/hid/devices/
>> The driver name is usually "hid-generic" but can be figured out for
>> each device by looking at the "driver" symlink in it's directry.
>> However, this is *really* just meant for debugging. This is not
>> recommended for anything serious. There is no support for that and if
>> you don't know what all this does, you shouldn't use it.
>>
>> There is no proper way to disable a single device in the kernel.
>> User-space is supposed to control device-access so we probably won't
>> add such features to the kernel. If you describe your use-case in more
>> details, we can try to give hints how to get that working.
>
> Sorry for not describing our situation clearer previously,
>
> The problem we met like below
> a. once plug in usb hid mouse and fast moving mouse
> b. the screen will get blur.
>
> We want to know whether the screen blur is caused by
> 1. the interrupt frequency of usb mouse is too high for our embedded
> system that make video decode slow
> 2. something wrong between hw cursor and video overlay.
>
> if we can deceive user mode program there is no mouse event, but
> kernel usb level still get hid interrupt transaction.
> We may clarify whether above 1) conclusion is correct.
>
> Appreciate your kind help :-)
You can unload the HID driver as described above, but that's unlikely
to fix any interrupt issues. How about you compile your kernel without
usbhid support? (CONFIG_USB_HID)
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-23 15:16 ` David Herrmann
@ 2014-02-24 11:20 ` loody
2014-02-24 11:35 ` David Herrmann
0 siblings, 1 reply; 8+ messages in thread
From: loody @ 2014-02-24 11:20 UTC (permalink / raw)
To: David Herrmann; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
hi David:
2014-02-23 23:16 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
> Hi
>
> On Sun, Feb 23, 2014 at 7:52 AM, loody <miloody@gmail.com> wrote:
>> hi David:
>>
>> Thanks for your suggestion.
>> 2014-02-23 0:56 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>>> Hi
>>>
>>> On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
>>>> hi all:
>>>> is there any kernel hid module parameter or test program can
>>>> temporarily not letting user mode program not receiving hid event?
>>>> 1. My hid kos are still inserted in.
>>>> 2. the kernel usb driver is working well; that mean kernel usb driver
>>>> still handle interrupt transaction.
>>>>
>>>> I just not want user mode program see the hid event for a while,
>>>
>>> For each connected HID device, there is a driver bound to it that
>>> reads the events and forwards them to HID core. What you can do, is to
>>> unbind a driver on a given device:
>>> echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
>>> The device-name is the directory name in:
>>> /sys/bus/hid/devices/
>>> The driver name is usually "hid-generic" but can be figured out for
>>> each device by looking at the "driver" symlink in it's directry.
>>> However, this is *really* just meant for debugging. This is not
>>> recommended for anything serious. There is no support for that and if
>>> you don't know what all this does, you shouldn't use it.
>>>
>>> There is no proper way to disable a single device in the kernel.
>>> User-space is supposed to control device-access so we probably won't
>>> add such features to the kernel. If you describe your use-case in more
>>> details, we can try to give hints how to get that working.
>>
>> Sorry for not describing our situation clearer previously,
>>
>> The problem we met like below
>> a. once plug in usb hid mouse and fast moving mouse
>> b. the screen will get blur.
>>
>> We want to know whether the screen blur is caused by
>> 1. the interrupt frequency of usb mouse is too high for our embedded
>> system that make video decode slow
>> 2. something wrong between hw cursor and video overlay.
>>
>> if we can deceive user mode program there is no mouse event, but
>> kernel usb level still get hid interrupt transaction.
>> We may clarify whether above 1) conclusion is correct.
>>
>> Appreciate your kind help :-)
>
> You can unload the HID driver as described above, but that's unlikely
> to fix any interrupt issues. How about you compile your kernel without
> usbhid support? (CONFIG_USB_HID)
BTW, is there any fake virtual mouse to use?
That mean user doesn't plug in any usb hid mouse, but user mode
program can receive hid mouse event?
--
Regards,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-24 11:20 ` loody
@ 2014-02-24 11:35 ` David Herrmann
2014-02-24 12:34 ` loody
0 siblings, 1 reply; 8+ messages in thread
From: David Herrmann @ 2014-02-24 11:35 UTC (permalink / raw)
To: loody; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
Hi
On Mon, Feb 24, 2014 at 12:20 PM, loody <miloody@gmail.com> wrote:
> hi David:
>
> 2014-02-23 23:16 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>> Hi
>>
>> On Sun, Feb 23, 2014 at 7:52 AM, loody <miloody@gmail.com> wrote:
>>> hi David:
>>>
>>> Thanks for your suggestion.
>>> 2014-02-23 0:56 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>>>> Hi
>>>>
>>>> On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
>>>>> hi all:
>>>>> is there any kernel hid module parameter or test program can
>>>>> temporarily not letting user mode program not receiving hid event?
>>>>> 1. My hid kos are still inserted in.
>>>>> 2. the kernel usb driver is working well; that mean kernel usb driver
>>>>> still handle interrupt transaction.
>>>>>
>>>>> I just not want user mode program see the hid event for a while,
>>>>
>>>> For each connected HID device, there is a driver bound to it that
>>>> reads the events and forwards them to HID core. What you can do, is to
>>>> unbind a driver on a given device:
>>>> echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
>>>> The device-name is the directory name in:
>>>> /sys/bus/hid/devices/
>>>> The driver name is usually "hid-generic" but can be figured out for
>>>> each device by looking at the "driver" symlink in it's directry.
>>>> However, this is *really* just meant for debugging. This is not
>>>> recommended for anything serious. There is no support for that and if
>>>> you don't know what all this does, you shouldn't use it.
>>>>
>>>> There is no proper way to disable a single device in the kernel.
>>>> User-space is supposed to control device-access so we probably won't
>>>> add such features to the kernel. If you describe your use-case in more
>>>> details, we can try to give hints how to get that working.
>>>
>>> Sorry for not describing our situation clearer previously,
>>>
>>> The problem we met like below
>>> a. once plug in usb hid mouse and fast moving mouse
>>> b. the screen will get blur.
>>>
>>> We want to know whether the screen blur is caused by
>>> 1. the interrupt frequency of usb mouse is too high for our embedded
>>> system that make video decode slow
>>> 2. something wrong between hw cursor and video overlay.
>>>
>>> if we can deceive user mode program there is no mouse event, but
>>> kernel usb level still get hid interrupt transaction.
>>> We may clarify whether above 1) conclusion is correct.
>>>
>>> Appreciate your kind help :-)
>>
>> You can unload the HID driver as described above, but that's unlikely
>> to fix any interrupt issues. How about you compile your kernel without
>> usbhid support? (CONFIG_USB_HID)
>
> BTW, is there any fake virtual mouse to use?
> That mean user doesn't plug in any usb hid mouse, but user mode
> program can receive hid mouse event?
Yes. For instance, you can run ./samples/uhid/uhid-example.c via ssh
to emulate a mouse. ssh keyboard input can then be used to generate
mouse-movement events.
Thanks
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
2014-02-24 11:35 ` David Herrmann
@ 2014-02-24 12:34 ` loody
[not found] ` <CANudz+t3uNCH0WxN-QU0aB78WWfS+Q-N-TDONGfmYdmucZbDoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: loody @ 2014-02-24 12:34 UTC (permalink / raw)
To: David Herrmann; +Cc: open list:HID CORE LAYER, linux-usb@vger.kernel.org
hi David:
2014-02-24 19:35 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
> Hi
>
> On Mon, Feb 24, 2014 at 12:20 PM, loody <miloody@gmail.com> wrote:
>> hi David:
>>
>> 2014-02-23 23:16 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>>> Hi
>>>
>>> On Sun, Feb 23, 2014 at 7:52 AM, loody <miloody@gmail.com> wrote:
>>>> hi David:
>>>>
>>>> Thanks for your suggestion.
>>>> 2014-02-23 0:56 GMT+08:00 David Herrmann <dh.herrmann@gmail.com>:
>>>>> Hi
>>>>>
>>>>> On Sat, Feb 22, 2014 at 5:35 PM, loody <miloody@gmail.com> wrote:
>>>>>> hi all:
>>>>>> is there any kernel hid module parameter or test program can
>>>>>> temporarily not letting user mode program not receiving hid event?
>>>>>> 1. My hid kos are still inserted in.
>>>>>> 2. the kernel usb driver is working well; that mean kernel usb driver
>>>>>> still handle interrupt transaction.
>>>>>>
>>>>>> I just not want user mode program see the hid event for a while,
>>>>>
>>>>> For each connected HID device, there is a driver bound to it that
>>>>> reads the events and forwards them to HID core. What you can do, is to
>>>>> unbind a driver on a given device:
>>>>> echo "<your-device-name>" >/sys/bus/hid/drivers/<driver-name>/unbind
>>>>> The device-name is the directory name in:
>>>>> /sys/bus/hid/devices/
>>>>> The driver name is usually "hid-generic" but can be figured out for
>>>>> each device by looking at the "driver" symlink in it's directry.
>>>>> However, this is *really* just meant for debugging. This is not
>>>>> recommended for anything serious. There is no support for that and if
>>>>> you don't know what all this does, you shouldn't use it.
>>>>>
>>>>> There is no proper way to disable a single device in the kernel.
>>>>> User-space is supposed to control device-access so we probably won't
>>>>> add such features to the kernel. If you describe your use-case in more
>>>>> details, we can try to give hints how to get that working.
>>>>
>>>> Sorry for not describing our situation clearer previously,
>>>>
>>>> The problem we met like below
>>>> a. once plug in usb hid mouse and fast moving mouse
>>>> b. the screen will get blur.
>>>>
>>>> We want to know whether the screen blur is caused by
>>>> 1. the interrupt frequency of usb mouse is too high for our embedded
>>>> system that make video decode slow
>>>> 2. something wrong between hw cursor and video overlay.
>>>>
>>>> if we can deceive user mode program there is no mouse event, but
>>>> kernel usb level still get hid interrupt transaction.
>>>> We may clarify whether above 1) conclusion is correct.
>>>>
>>>> Appreciate your kind help :-)
>>>
>>> You can unload the HID driver as described above, but that's unlikely
>>> to fix any interrupt issues. How about you compile your kernel without
>>> usbhid support? (CONFIG_USB_HID)
>>
>> BTW, is there any fake virtual mouse to use?
>> That mean user doesn't plug in any usb hid mouse, but user mode
>> program can receive hid mouse event?
>
> Yes. For instance, you can run ./samples/uhid/uhid-example.c via ssh
> to emulate a mouse. ssh keyboard input can then be used to generate
> mouse-movement events.
There is one embarrassing question :-)
Would you please let me know how to cross-compile it ?
I try below commands but failed
#cd samples/uhid/
#make CROSS_COMPILE=arm-v7a8v4r2-linux-gnueabi-
make: *** No targets. Stop.
Thanks for your kind help,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: is it possible to temporarily not let user mode get hid input event
[not found] ` <CANudz+t3uNCH0WxN-QU0aB78WWfS+Q-N-TDONGfmYdmucZbDoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-24 12:37 ` David Herrmann
0 siblings, 0 replies; 8+ messages in thread
From: David Herrmann @ 2014-02-24 12:37 UTC (permalink / raw)
To: loody
Cc: open list:HID CORE LAYER,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi
On Mon, Feb 24, 2014 at 1:34 PM, loody <miloody-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Yes. For instance, you can run ./samples/uhid/uhid-example.c via ssh
>> to emulate a mouse. ssh keyboard input can then be used to generate
>> mouse-movement events.
> There is one embarrassing question :-)
> Would you please let me know how to cross-compile it ?
> I try below commands but failed
> #cd samples/uhid/
> #make CROSS_COMPILE=arm-v7a8v4r2-linux-gnueabi-
> make: *** No targets. Stop.
>
> Thanks for your kind help,
Don't use the Makefile. Use gcc directly:
gcc -o uhid-example -Wall samples/uhid/uhid-example.c
It's just one source file, you should be able to compile it on the
device. No idea how your cross-compiler works, so cannot help you
there.
Thanks
David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-24 12:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-22 16:35 is it possible to temporarily not let user mode get hid input event loody
2014-02-22 16:56 ` David Herrmann
2014-02-23 6:52 ` loody
2014-02-23 15:16 ` David Herrmann
2014-02-24 11:20 ` loody
2014-02-24 11:35 ` David Herrmann
2014-02-24 12:34 ` loody
[not found] ` <CANudz+t3uNCH0WxN-QU0aB78WWfS+Q-N-TDONGfmYdmucZbDoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-24 12:37 ` David Herrmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).