USB Keyboard

USB Keyboard

Post by Shane Almeid » Fri, 31 May 2002 07:24:15



Is there a trick to getting USB keyboards to cooperate with OpenBSD?
I'm running 3.1 with a custom kernel.  I made sure the kernel included
the appropriate USB support, I think.  This is what I included:

# PCI USB Controllers
uhci*   at pci?      # Universal Host Controller (Intel)
ohci*   at pci?      # Open Host Controller

# USB bus support
usb*    at uhci?
usb*    at ohci?

uhub*   at usb?                         # USB Hubs
uhub*   at uhub? port ? configuration ? # USB Hubs
uhid*   at uhub? port ? configuration ? # USB Generic HID devices
uvisor* at uhub? port ? configuration ? # Handspring Visor
ucom*   at uvisor?
ukbd*   at uhub? port ? configuration ? # USB Keyboards
wskbd*  at ukbd? console ? mux 1
ums*    at uhub? port ? configuration ? # USB Mice
wsmouse* at ums? mux 0
ugen*   at uhub? port ? configuration ? # USB Generic driver

I have a USB Mitsumi keyboard and a USB Microsoft Intellipoint Optical
mouse.  I also have a Handspring Visor and a Sony Digital camera, but
I'm really just shooting for getting the keyboard and mouse working.
When I plug either the keyboard or mouse in, the system spits out
messages like this:

ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
iclass 3/1
wskbd1 at ukbd0 mux 1

and

ums0: Microsoft Microsoft 5-Button Mouse with IntelliEye(TM), rev
1.10/3.00, addr 2, iclass 3/1
ums0: 5 buttons and Z dir.
wsmouse0 at ums0

The mouse works in xf86cfg, but I can't actually get X to run (that's
next on my list of things to do) so I don't know if it works there (I
assume it does).  But, the keyboard is totally dead.  I've tried having
it plugged in at bootup as well as plugging it in after the system was
booted.  Do I have to do something special before the keyboard will
function?  In my BIOS, there is an option for "USB Keyboard."  I get the
same results with this enabled or disabled.

Can anyone give me some guidance?  Thanks.

 
 
 

USB Keyboard

Post by Ted » Fri, 31 May 2002 10:26:52



> Is there a trick to getting USB keyboards to cooperate with OpenBSD?
> I'm running 3.1 with a custom kernel.  I made sure the kernel included
> the appropriate USB support, I think.  This is what I included:
> ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
> iclass 3/1
> wskbd1 at ukbd0 mux 1

it says wskbd1 connecting to wsdisplay0 then, right?  otherwise, it should
work.  just plug it in and type.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

USB Keyboard

Post by Shane Almeid » Fri, 31 May 2002 10:47:53




>>Is there a trick to getting USB keyboards to cooperate with OpenBSD?
>>I'm running 3.1 with a custom kernel.  I made sure the kernel included
>>the appropriate USB support, I think.  This is what I included:

>>ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
>>iclass 3/1
>>wskbd1 at ukbd0 mux 1

> it says wskbd1 connecting to wsdisplay0 then, right?  otherwise, it should
> work.  just plug it in and type.

No, it doesn't mention anything about wsdisplay0.  These are the log
entries:

May 29 21:44:00 headless /bsd: ukbd0 at uhub0 port 2 configuration 1
interface 0
May 29 21:44:00 headless /bsd:
May 29 21:44:00 headless /bsd: ukbd0: Mitsumi Electric Mitsumi USB
Keyboard, rev 1.00/1.00, addr 2, iclass 3/1
May 29 21:44:00 headless /bsd: wskbd1 at ukbd0 mux 1

The keyboard's Num Lock, Caps Lock, Scroll Lock lights blink on and then
off.  I try to type and nothing happens.  When I unplug it, this is what
shows up in the log:

May 29 21:44:16 headless /bsd: ukbd0: at uhub0 port 2 (addr 2) disconnected
May 29 21:44:16 headless /bsd: wskbd1 detached
May 29 21:44:16 headless /bsd: ukbd0 detached

Is it supposed to connect to wsdisplay0 instead of ukbd0?  How do I make
that happen?  Thanks for the help.

 
 
 

USB Keyboard

Post by Ted » Fri, 31 May 2002 13:46:47



> >>ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
> >>iclass 3/1
> >>wskbd1 at ukbd0 mux 1

> > it says wskbd1 connecting to wsdisplay0 then, right?  otherwise, it should
> > work.  just plug it in and type.

> No, it doesn't mention anything about wsdisplay0.  These are the log
> entries:

That's not good.  ukbd0 should attach to wskbd1, like it does, but wkbd1
needs to attach to the console, wsdisplay0.  Are you using the GENERIC
kernel?

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

USB Keyboard

Post by Shane Almeid » Fri, 31 May 2002 14:30:21




>>>>ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
>>>>iclass 3/1
>>>>wskbd1 at ukbd0 mux 1

>>>it says wskbd1 connecting to wsdisplay0 then, right?  otherwise, it should
>>>work.  just plug it in and type.

>>No, it doesn't mention anything about wsdisplay0.  These are the log
>>entries:

> That's not good.  ukbd0 should attach to wskbd1, like it does, but wkbd1
> needs to attach to the console, wsdisplay0.  Are you using the GENERIC
> kernel?

No, like I said, it's a stripped down kernel, but I think I included all
the relevant USB stuff.  I still have GENERIC, so I can try to booting
to that.  I'll let you know how that goes.
 
 
 

USB Keyboard

Post by Shane Almeid » Sat, 01 Jun 2002 00:50:46




>>>>ukbd0: Mitsumi Electric Mitsumi USB Keyboard, rev 1.00/1.00, addr 2,
>>>>iclass 3/1
>>>>wskbd1 at ukbd0 mux 1

>>>it says wskbd1 connecting to wsdisplay0 then, right?  otherwise, it should
>>>work.  just plug it in and type.

>>No, it doesn't mention anything about wsdisplay0.  These are the log
>>entries:

> That's not good.  ukbd0 should attach to wskbd1, like it does, but wkbd1
> needs to attach to the console, wsdisplay0.  Are you using the GENERIC
> kernel?

I booted to the GENERIC kernel and the keyboard worked fine.  I'll have
to take a closer look at my kernel and see where I messed up.

A new problem has come up though.  My mouse stopped working.  It works
fine in xf86cfg but when I run startx it doesn't respond.  Very curious.
  This is with either the GENERIC kernel (with the USB keyboard) or my
kernel (with a PS/2 keyboard).  Any ideas on this one?  This is what I
have in /etc/X11/XF86Config:

Section "InputDevice"
         Identifier  "Mouse0"
         Driver      "mouse"
         Option      "Protocol" "Auto"
         Option      "Device" "/dev/wsmouse0"
EndSection

According to the documentation at xfree86.org, the protocol should be
usb and the device should be "the /dev/uhid* instance corresponding to
your mouse as the device name."  How do I figure out which uhid my mouse
is attached to?

 
 
 

USB Keyboard

Post by Ted » Sat, 01 Jun 2002 02:18:59



> Section "InputDevice"
>          Identifier  "Mouse0"
>          Driver      "mouse"
>          Option      "Protocol" "Auto"
>          Option      "Device" "/dev/wsmouse0"
> EndSection

protocol wsmouse

Quote:> According to the documentation at xfree86.org, the protocol should be
> usb and the device should be "the /dev/uhid* instance corresponding to
> your mouse as the device name."  How do I figure out which uhid my mouse
> is attached to?

Nah, their documentation is out of date for the "right" way to do it.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

USB Keyboard

Post by Shane Almeid » Sat, 01 Jun 2002 05:43:01



>>I booted to the GENERIC kernel and the keyboard worked fine.  I'll have
>>to take a closer look at my kernel and see where I messed up.

> You ought to tell us which kernel, which platform (it seems it's
> obviously i386, but it could be vax ;) anyways. Remember this next time.

3.1 on i386.  GENERIC kernel works fine with USB mouse and keyboard.  My
stripped down kernel works fine with the mouse but the keyboard goes
dead as soon as OpenBSD recognizes it.  I thought I included all of the
relevent USB stuff in my kernel, but I must have commented out something
important.  Does anyone know if USB keyboards depend on something in the
kernel config that is not in the USB section?  The USB stuff I used is
at the end of this post.

Quote:>>        Option      "Protocol" "Auto"

> Nope, wsmouse.

>>According to the documentation at xfree86.org, the protocol should be

> Most "free software" documentation is GNU/Linux-centric, as a matter
> of fact and pityness. However, there _is_ documentation in OpenBSD.

I was looking at the OpenBSD specific mouse documentation at
xfree86.org, but, as Ted U. pointed out, that documentation seems to be
outdated.  The mouse now works fine using "Protocol" "wsmouse".

USB stuff from /sys/arch/i386/conf/MYKERNEL:

# PCI USB Controllers
uhci*   at pci?                         # Universal Host Controller (Intel)
ohci*   at pci?                         # Open Host Controller

# USB bus support
usb*    at uhci?
usb*    at ohci?

uhub*   at usb?                         # USB Hubs
uhub*   at uhub? port ? configuration ? # USB Hubs
uhid*   at uhub? port ? configuration ? # USB Generic HID devices
#umodem*        at uhub? port ? configuration ? # USB Modems/Serial
#ucom*  at umodem?
uvisor* at uhub? port ? configuration ? # Handspring Visor
ucom*   at uvisor?
#uftdi* at uhub? port ?                 # FTDI FT8U100AX serial adapter
#ucom*  at uftdi? portno ?
#uplcom* at uhub? port ?                        # I/O DATA USB-RSAQ2
serial adapter
#ucom*   at uplcom? portno ?

#uaudio* at uhub? port ? configuration ?        # USB Audio
#ulpt*  at uhub? port ? configuration ? # USB Printers
ukbd*   at uhub? port ? configuration ? # USB Keyboards
wskbd*  at ukbd? console ? mux 1
#umass* at uhub? port ? configuration ? # USB Mass Storage devices
#scsibus* at umass?
ums*    at uhub? port ? configuration ? # USB Mice
wsmouse* at ums? mux 0
#aue*   at uhub? port ?                 # ADMtek AN986 Pegasus Ethernet
#cue*   at uhub? port ?                 # CATC USB-EL1201A based Ethernet
#kue*   at uhub? port ?                 # Kawasaki KL5KUSB101B based
Ethernet
#upl*   at uhub? port ?                 # Prolific PL2301/PL2302
host-to-host `network'
#urio*  at uhub? port ?                 # Diamond Multimedia Rio 500
#uscanner* at uhub? port ?              # USB Scanners
#usscanner* at uhub? port ?             # USB SCSI scanners, e.g., HP5300
#scsibus* at usscanner?

ugen*   at uhub? port ? configuration ? # USB Generic driver

 
 
 

USB Keyboard

Post by Ted » Sat, 01 Jun 2002 09:53:08



> 3.1 on i386.  GENERIC kernel works fine with USB mouse and keyboard.  My
> stripped down kernel works fine with the mouse but the keyboard goes
> dead as soon as OpenBSD recognizes it.  I thought I included all of the
> relevent USB stuff in my kernel, but I must have commented out something
> important.  Does anyone know if USB keyboards depend on something in the
> kernel config that is not in the USB section?  The USB stuff I used is
> at the end of this post.

there is a chance that a change elsewhere would affect the usb devices.
the only way to find out is to put stuff back in, or start again with
GENERIC and be more conservative about removing things.  i'd start with
just removing network and scsi drivers, they're a safe bet.  some of the
seemingly random devices and options depend on each other in ways that are
not obvious, and maybe not even correct.  for example, for several
releases you couldn't build a kernel with crypto support but without ppp
and ipsec.  if at first you don't succeed...

--

> >>        Option      "Protocol" "Auto"

> > Nope, wsmouse.

> >>According to the documentation at xfree86.org, the protocol should be

> > Most "free software" documentation is GNU/Linux-centric, as a matter
> > of fact and pityness. However, there _is_ documentation in OpenBSD.

> I was looking at the OpenBSD specific mouse documentation at
> xfree86.org, but, as Ted U. pointed out, that documentation seems to be
> outdated.  The mouse now works fine using "Protocol" "wsmouse".

> USB stuff from /sys/arch/i386/conf/MYKERNEL:

> # PCI USB Controllers
> uhci*   at pci?                         # Universal Host Controller (Intel)
> ohci*   at pci?                         # Open Host Controller

> # USB bus support
> usb*    at uhci?
> usb*    at ohci?

> uhub*   at usb?                         # USB Hubs
> uhub*   at uhub? port ? configuration ? # USB Hubs
> uhid*   at uhub? port ? configuration ? # USB Generic HID devices
> #umodem*        at uhub? port ? configuration ? # USB Modems/Serial
> #ucom*  at umodem?
> uvisor* at uhub? port ? configuration ? # Handspring Visor
> ucom*   at uvisor?
> #uftdi* at uhub? port ?                 # FTDI FT8U100AX serial adapter
> #ucom*  at uftdi? portno ?
> #uplcom* at uhub? port ?                        # I/O DATA USB-RSAQ2
> serial adapter
> #ucom*   at uplcom? portno ?

> #uaudio* at uhub? port ? configuration ?        # USB Audio
> #ulpt*  at uhub? port ? configuration ? # USB Printers
> ukbd*   at uhub? port ? configuration ? # USB Keyboards
> wskbd*  at ukbd? console ? mux 1
> #umass* at uhub? port ? configuration ? # USB Mass Storage devices
> #scsibus* at umass?
> ums*    at uhub? port ? configuration ? # USB Mice
> wsmouse* at ums? mux 0
> #aue*   at uhub? port ?                 # ADMtek AN986 Pegasus Ethernet
> #cue*   at uhub? port ?                 # CATC USB-EL1201A based Ethernet
> #kue*   at uhub? port ?                 # Kawasaki KL5KUSB101B based
> Ethernet
> #upl*   at uhub? port ?                 # Prolific PL2301/PL2302
> host-to-host `network'
> #urio*  at uhub? port ?                 # Diamond Multimedia Rio 500
> #uscanner* at uhub? port ?              # USB Scanners
> #usscanner* at uhub? port ?             # USB SCSI scanners, e.g., HP5300
> #scsibus* at usscanner?

> ugen*   at uhub? port ? configuration ? # USB Generic driver

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.
 
 
 

1. USB keyboard/mouse with USB/KVM switch?

I'm trying to use a MiniView 4-port USB/KVM switch on three machines:
a Macintosh running OS X, a Pentium running SuSE (7.1, I think, but the
keyboard/mouse is frozen right now), and an Athlon running Mandrake
8.0.

The Mac works, but the damned Linux installations "lose contact" with
USB when I switch back to them.  There is usually a one or two-second
delay in OS X before contact is re-established, but I can live with
that; I **cannot** live with the others' mindless idiocy.  Even Windows
knows USB better than this!!

Is there some different version of the USB stuff which will work?  I'm
running kernel 2.4.3 on Mandrake,  dunno what on SuSE (because I
switched...)

--Ron Bruck

2. Konqueror crashes

3. Problems with a USB keyboard and a PS2 mouse chained to the keyboard

4. Can't find "default" font when starting startx...help!

5. PS/2 keyboard idetified as USB keyboard

6. cc info.

7. How to: IBM Trackpoint USB keyboard

8. NE2000 compat. ISA card with UMC UM9003AF: opinions wanted..

9. USB keyboard with SuSE 9

10. USB keyboard and mouse support

11. new Sun USB keyboard and mouse with x86

12. USB Keyboard in 2.5 bitkeeper...

13. usb keyboard in grub bootscreen