On Mon, 02 May 2005 17:14:41 +1000 Andrew Hodgson wrote:

| Randy.Dunlap wrote:
| 
| >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.
| >  
| >
| Here is an lsmod. I haven't loaded anything special. The 2.6 kernels 
| seem to load a lot of modules I dont think I need.

Thanks.
Yes, fairly common for a distro kernel.

| Ill prune them when I have time.
| 
| # lsmod
| Module                  Size  Used by
| radeon                 77312  1
| drm                    66004  2 radeon
| ipv6                  251776  17
| nfsd                  223392  8
| exportfs                5888  1 nfsd
| appletalk              36084  20
| lp                     11524  0
| nfs                   211816  4
| lockd                  65960  3 nfsd,nfs
| sunrpc                143684  8 nfsd,nfs,lockd
| af_packet              21704  2
| psmouse                29256  0
| floppy                 59472  0
| pcspkr                  3428  0
| rtc                    11832  0
| snd_ens1371            23968  0
| snd_rawmidi            24288  1 snd_ens1371
| snd_seq_device          8780  1 snd_rawmidi
| snd_ac97_codec         77112  1 snd_ens1371
| snd_pcm                91592  2 snd_ens1371,snd_ac97_codec
| snd_timer              24452  1 snd_pcm
| snd                    55780  6 
| snd_ens1371,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer
| snd_page_alloc          9988  1 snd_pcm
| btaudio                17360  0
| bt878                  11128  0
| bttv                  154256  1 bt878
| video_buf              21892  1 bttv
| firmware_class         10176  1 bttv
| i2c_algo_bit            9864  1 bttv
| v4l2_common             5824  1 bttv
| btcx_risc               4872  1 bttv
| tveeprom               13144  1 bttv
| videodev                9728  1 bttv
| via686a                19992  0
| i2c_sensor              3648  1 via686a
| i2c_viapro              7952  0
| i2c_core               22288  6 
| bttv,i2c_algo_bit,tveeprom,via686a,i2c_sensor,i2c_viapro
| pci_hotplug            32880  0
| via_agp                 9600  1
| tsdev                   7744  0
| mousedev               11544  2
| evdev                   9536  0
| usbhid                 33600  0
| uhci_hcd               32144  0
| usbcore               119352  3 usbhid,uhci_hcd
| es1371                 34560  0
| soundcore               9760  3 snd,btaudio,es1371
| gameport                4480  2 snd_ens1371,es1371
| ac97_codec             19660  1 es1371
| e100                   34752  0
| mii                     5056  1 e100
| parport_pc             35972  1
| parport                36744  2 lp,parport_pc
| agpgart                34600  2 drm,via_agp
| capability              4808  0
| commoncap               6912  1 capability
| ide_cd                 41732  0
| cdrom                  40864  1 ide_cd
| isofs                  37112  0
| ext2                   68616  0
| ext3                  142792  4
| jbd                    57368  1 ext3
| mbcache                 9284  2 ext2,ext3
| ide_disk               17856  6
| ide_generic             1280  0 [permanent]
| via82cxxx              13532  0 [permanent]
| trm290                  4292  0 [permanent]
| triflex                 3776  0 [permanent]
| slc90e66                5760  0 [permanent]
| sis5513                16200  0 [permanent]
| siimage                12480  0 [permanent]
| serverworks             9160  0 [permanent]
| sc1200                  7360  0 [permanent]
| rz1000                  2560  0 [permanent]
| piix                   10180  0 [permanent]
| pdc202xx_old           11328  0 [permanent]
| opti621                 4420  0 [permanent]
| ns87415                 4296  0 [permanent]
| hpt366                 19904  0 [permanent]
| hpt34x                  5248  0 [permanent]
| generic                 3968  0 [permanent]
| cy82c693                4740  0 [permanent]
| cs5530                  5312  0 [permanent]
| cs5520                  4736  0 [permanent]
| cmd64x                 12060  0 [permanent]
| atiixp                  5904  0 [permanent]
| amd74xx                13788  0 [permanent]
| alim15x3               12172  0 [permanent]
| aec62xx                 7232  0 [permanent]
| pdc202xx_new            9152  0 [permanent]
| ide_core              129424  28 
| 
ide_cd,ide_disk,ide_generic,via82cxxx,trm290,triflex,slc90e66,sis5513,siimage,serverworks,sc1200,rz1000,piix,pdc202xx_old,opti621,ns87415,hpt366,hpt34x,generic,cy82c693,cs5530,cs5520,cmd64x,atiixp,amd74xx,alim15x3,aec62xx,pdc202xx_new
| unix                   27380  54
| fbcon                  38336  0
| font                    8320  1 fbcon
| bitblit                 5632  1 fbcon
| vesafb                  8152  0
| cfbcopyarea             3968  1 vesafb
| cfbimgblt               3008  1 vesafb
| cfbfillrect             3584  1 vesafb
| 
| >  
| >
| >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 do but renaming them disables my usb mouse (not good)

Hm, not good, as you say, but hid should handle your mouse.
It handles almost everyone else's mouse... unless they choose
to use usbmouse.


| >| 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.
| >  
| >
| Thanks. I can do that. I guess I was hoping to be able to do that 
| through some config file.
| 
| I actually though that I could do it with the hotplug usb.usermap files 
| but could not find any info on how.

A (kernel) config option wouldn't be a good idea for it, but a
module option would be (IMO), so that either /etc/modprobe.conf
could be used to set the option, or the usermap file, like you say,
would also make some sense.

| I have discovered that the latest lircd turns off the usbkbd when it 
| opens the /dev/input/event2 (not sure how, simply openning 
| /dev/input/event2 does not) . So it all works as long as lircd is running
| 
| Thanks for you help.

---
~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