On Mon, 02 May 2005 10:23:22 +1000 Andrew Hodgson wrote:

| Randy.Dunlap wrote:
| 
| >On Sat, 30 Apr 2005 18:08:56 +1000 Andrew Hodgson wrote:
| >
| >| I am new to configuring usb devices under linux.
| >| 
| >| I have searched the docs but have not found out how to do it.
| >
| >Did you read any of the kernel config help text?
| >  
| >
| Yes, I am actually an experienced linux/unix sysadmin/kernel programmer.

That's good, but not necessarily related to the question.  :)

| I just didnt want to go to that level if there was something simple I 
| was missing.
| 
| >
| >| Here is my problem.
| >| 
| >| I have a working usb IR remote control.
| >| 
| >| When I plug it in, it is found by my 2.6.9 setup without any problems.
| >| 
| >| -----------
| >| drivers/usb/core/usb.c: registered new driver hiddev
| >| input: USB HID v1.10 Keyboard [Twinhan Tech Remote Control] on 
usb-0000:00:07.2-2
| >| input: USB HID v1.10 Mouse [Twinhan Tech Remote Control] on 
usb-0000:00:07.2-2
| >| drivers/usb/core/usb.c: registered new driver hid
| >| -----------
| >| 
| >| I can then see the button presses through
| >| 
| >|    /dev/input/event2
| >|    /dev/input/mice
| >|     and
| >|            as key presses (both in X and in the consoles)
| >| 
| >| I only want to see them through /dev/input/event2 as I want to use it with
| >| lirc and dont want to get keyboard input to all my terminals.
| >| 
| >| Does anyone know how to configure hid not to attach the usbkbd and usbmouse
| >| drivers for a particular device. I dont want to disable them globally as I
| >| also have a usb mouse and keyboard
| >
| >The HID driver supports USB mice and keyboards, so you shouldn't even
| >be using or loading usbkbd and/or usbmouse unless you are SURE you
| >know what you are doing and why.  Kconfig help text for usbkbd,
| >usbmouse is similar:
| >
| >       Say Y here only if you are absolutely sure that you don't want
| >       to use the generic HID driver for your USB keyboard and prefer
| >       to use the keyboard in its limited Boot Protocol mode instead.
| >
| >       This is almost certainly not what you want.  This is mostly
| >       useful for embedded applications or simple keyboards.
| >
| >So you need either to disable usbkbd and usbmouse in your kernel
| >config/build, or (if they are loadable modules) prevent them from
| >being loaded, either by modifying /etc/modprobe.conf or by removing
| >or renaming them in /lib/modules/2.6.9/kernel/drivers/usb/input/ .
| >  
| >
| Sorry, I was not clear. The usbkbd & usbmouse kernel modules are NOT 
| loaded however the usb HID layer is installing something equivilent.
| 
| If I run usbmodules on the device I get
| 
| # usbmodules --device /proc/bus/usb/001/002
| usbhid
| usbkbd
| usbmouse

Let's see the output from 'lsmod' or 'cat /proc/modules'.
I'm still thinking that those are the HID Boot Protocol modules
that you don't want to use.

Do you have /lib/modules/2.6.9/kernel/drivers/usb/input/usb{kbd,mouse}.ko
files?  If so, please rename them to something that won't be
auto-loaded and try your test again.


| I'd really only want usbkbd as lircd --device dev/input opens 
| /dev/input/event2 to read the events directly. I dont button presses on 
| the remote being translated to keyboard input. Especially the power 
| button which seems to get translated to ^-alt-backspace which causes my 
| X server to restart.
| 
| >| I am sure it is trivial but google has failed me :-)
| >| 
| >| Any help greatly appreciated
| >  
| >
| Thanks for your suggestions.
| 
| I guess I need slightly more specific answer. How do I turn of 
| hid/usbkbd for a specific usb device. I cant turn it off globally as I 
| also have a usb keyboard and mouse.

Modify drivers/usb/input/hid-core.c, around line #1467 (in 2.6.9).
There is a hid_blacklist array there.  Add your device's vendor ID,
product ID, and quirk (HID_QUIRK_IGNORE).  Rebuild & reload the hid driver
and you should be all set.

---
~Randy


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to