[lug] help on hotplug, insmod and modules
D. Stimits
stimits at attbi.com
Sat Mar 8 13:23:36 MST 2003
Phil Rasch wrote:
> I just bought a spiffy new toy. It is a device for use in making
> presentations. You plug a little RF receiver into the USB port of your
> laptop, and then control the presentation using a set of buttons and
> switches on a lightweight handheld remote device that includes a laser
> pointer.
>
> It took a bit of fussing around to get the thing working.
>
> I am still confused about how to get it to work perfectly, and I would
> like to make the setup rock solid before I forget what needs doing.
>
> I am trying to do this on a laptop running a debian test/unstable
> distribution, running a 2.4.20 kernel.
>
> When I boot it up. It doesnt recognize the device.
>
> Here are some of the relevant entries from /var/log/messages
>
> Mar 7 18:25:24 squall kernel: usb.c: registered new driver keyboard
> Mar 7 18:25:24 squall kernel: input0: Keyspan, a division of InnoSys
> Inc. Keyspan RF Remote on usb1:2.0
> Mar 7 18:25:24 squall kernel: usbkbd.c: :USB HID Boot Protocol
> keyboard driver
> Mar 7 18:25:24 squall kernel: usb.c: registered new driver hiddev
> Mar 7 18:25:24 squall kernel: usb.c: registered new driver hid
> Mar 7 18:25:24 squall kernel: input1: USB HID v1.00 Mouse [Keyspan, a
> division of InnoSys Inc. Keyspan RF Remote] on usb1:2.1
> Mar 7 18:25:24 squall kernel: hid-core.c: v1.8.1 Andreas Gal, Vojtech
> Pavlik
>
>
> and then later (perhaps after I have plugged and unplugged the
> receiver)
>
>
> Mar 7 18:33:15 squall kernel: usb.c: deregistering driver keyboard
> Mar 7 18:33:16 squall kernel: input0: USB HID v1.00 Keyboard
> [Keyspan, a division of InnoSys Inc. Keyspan RF Remote] on usb1:2.0
> Mar 7 18:33:22 squall kernel: usb.c: registered new driver usb_mouse
> Mar 7 18:33:22 squall kernel: usbmouse.c: v1.6:USB HID Boot Protocol
> mouse driver
> Mar 7 18:33:53 squall kernel: usb.c: USB disconnect on device
> 00:07.2-1 address 2
> Mar 7 18:33:57 squall kernel: hub.c: new USB device 00:07.2-1,
> assigned address 3
> Mar 7 18:33:57 squall kernel: input0: USB HID v1.00 Keyboard
> [Keyspan, a division of InnoSys Inc. Keyspan RF Remote] on usb1:3.0
> Mar 7 18:33:57 squall kernel: input1: USB HID v1.00 Mouse [Keyspan, a
> division of InnoSys Inc. Keyspan RF Remote] on usb1:3.1
> Mar 7 18:34:00 squall /etc/hotplug/usb.agent: Setup usbkbd hid
> usbmouse for USB product 6cd/402/3
> Mar 7 18:34:00 squall kernel: usb.c: registered new driver keyboard
> Mar 7 18:34:00 squall kernel: usbkbd.c: :USB HID Boot Protocol
> keyboard driver
> Mar 7 18:34:00 squall /etc/hotplug/usb.agent: Setup keybdev mousedev
> for USB product 6cd/402/3
>
> The log is messed up a bit due to my inexperience. I tried a variety
> of things in trying to get it going. What i do know unambiguously is
> the following.
>
> Once the machine is completely booted up (into X) and I do an lsmod it
> does not show a module for a usbmouse but does show a module for a usb
> keyboard. If I do an rmmod of usbkbd, then an insmod of usbmouse,
> then log out, restart X, and then try it, everything works fine.
>
> So the key thing (I think) is that I have to get hotplug to recognize
> that the device is a usbmouse, rather than a usbkeyboard (which I
> think it is assuming). I assume all this should really take place
> during boot time, so the device is recognized prior to bringing up X.
>
> I guess that I could force usbmouse to be
> loaded in the modules.conf file, but I think the right thing to do is
> to use the hotplug configuration. But I cant figure out how to do it.
>
> I have grubbed around some on the web, but I cant figure out the
> procedure.
>
> Can anybody shed some light on this?
Perhaps, if you don't actually use the particular kernel module for
another device that really is a keyboard, you can alias the module in
/etc/modules.conf (or conf.modules, not sure what debian uses). For
example, if the kernel asks for a driver for "eth0", it won't find it,
because it needs something for exact hardware...therefore, it is aliased
in modules.conf as something similar to "alias eth0 eepro100" for an
Intel Etherexpress Pro 100 card (or tulip for a Linksys NIC, or just to
"off" to shut it up when the hardware doesn't exist or you don't want it
enabled, so on). Perhaps, in this case, you could "alias usbkbd
usbmouse". If that fails, you could possibly add some rules to
modules.conf, such as a post-install rule to force uninstall, and
simultaneously adding a post-remove rule that removing the usbkeyboard
causes a depmod of the mouse module.
Then again, it might be more proper to go to the /etc/hotplug (or
whatever debian uses) and update something there (unfortunately, I don't
have a laptop, and have not played with hotplug much).
D. Stimits, stimits AT attbi DOT com
More information about the LUG
mailing list