Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

     Setting up a USB mouse in FreeBSD 4.x



For this article, I will explain how to install your USB mouse in FreeBSD, and how to operate it in the console & X. I will assume you can build your own custom kernels. If not, please read the handbook section first.


Firstly, you need to add some options to the kernel. These are:

# USB mouse support
#device     uhci      # UHCI PCI->USB interface
#device    ohci      # OHCI PCI->USB interface
device     usb       # USB Bus (required)
device     ums       # Mouse
pseudo-device  ether      # REQUIRED for usb


With these above settings added to the kernel it is VERY IMPORTANT you uncomment only one line; either uhci OR ohci. To work out which one you need to uncomment for particular USB controller, read the manpages for uhci & ohci.

Also, the ether device is needed. Without it, your kernel will not compile.

The ums device enables the usb mouse code, and the usb devide is code required for usb operation of all devices.

Now compile your kernel, and reboot.


Once you have rebooted, you should see your usb controller and usb mouse listed in dmesg. To check, type dmesg|more.

You should see something similar, to what is shown below. Not I have 2 USB
controllers.


uhci0: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 10 at device 7.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0: Microsoft Microsoft IntelliMouse\M-. Optical, rev 1.10/1.08, addr 2, iclass 3/1
ums0: 5 buttons and Z dir.
uhci1: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 10 at device 7.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered


Now you know your mouse is detected by the system, edit /etc/rc.conf and add these items:

moused_enable="YES"
moused_port="/dev/ums0"

ums0 could be any other number depending on where your mouse is on the hub.Check dmesg to be sure. After another reboot, your mouse pointer should now move around the screen in the console.

For setting up your mouse in X, set up X normally, but use "Auto" as the mouse type, and /dev/sysmouse for the port.

Notes:
=====

If you can't see /dev/umsX in /dev after booting your new kernel, cd to /dev
and type ./MAKEDEV ums as root.

Good Luck!

Andy Smith [ aa_smith@iname.com ]

 
^Geezer
 

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.