On Thu, Sep 04, 2003 at 05:15:59AM -0700, Mark Knecht wrote:
> I didn't know about usbview. I emerged it and it's showing what I
> thought might be happening. No USB...
> 
> "Can not open the file /proc/bus/usb/devices
[...]
> So I think this comes back to my original question. What USB options do
> I need to enable when I compile my kernel to get enough USB support to
> make this work? No /proc/bus/usb sounds pretty fundamental.
> 
> Looking in make xconfig, and then help under USB Support, the
> 'Preliminary File System' option is set to 'No' and it seems to be the
> key to getting /proc/bus/usb/devices to exist. It says most users want
> to say yes. I'm currently saying no.

   Yes, you definitely need that option turned on.  Most USB utilities use
those files so that they don't have to try wading through kernel memory
space trying to find information.

   Here's what I have set, from the .config file:
CONFIG_USB                  'Support for USB'
 - Fundamental

CONFIG_USB_DEVICEFS         'Preliminary USB device filesystem'
 - Creates the /proc/bus/usb filesystem that everything else reads

CONFIG_USB_LONG_TIMEOUT     'Long timeout for slow-responding devices
                             (some MGE Ellipse UPSes)'
 - This just makes the USB driver more patient than it should need to be;
   some devices (like the aforementioned UPSes, and some scanners) need this.

CONFIG_USB_EHCI_HCD         '
CONFIG_USB_UHCI_ALT         'UHCI Alternate Driver (JE) support'
 - Don't recall why I use the Alternate driver rather than the main one, but
   either should work.

CONFIG_USB_AUDIO            'USB Audio support'
CONFIG_USB_MIDI             'USB MIDI support'
 - Don't actually use either of these, just keeping them in case I buy a new
   device for them later.  You won't need them.

CONFIG_USB_STORAGE          'USB Mass Storage support'
CONFIG_USB_STORAGE_DEBUG    'USB Mass Storage verbose debug'
CONFIG_USB_STORAGE_DATAFAB  'Datafab MDCFE-B Compact Flash Reader support'
CONFIG_USB_STORAGE_FREECOM  'Freecom USB/ATAPI Bridge support'
CONFIG_USB_STORAGE_ISD200   'ISD-200 USB/ATA Bridge support'
CONFIG_USB_STORAGE_DPCM     'Microtech CompactFlash/SmartMedia support'
CONFIG_USB_STORAGE_SDDR09   'SanDisk SDDR-09 (and other SmartMedia) support'
CONFIG_USB_STORAGE_SDDR55   'SanDisk SDDR-55 SmartMedia support'
CONFIG_USB_STORAGE_JUMPSHOT 'Lexar Jumpshot Compact Flash Reader'
 - I do have a USB disk enclosure, and will likely be getting a flash reader
   at some point, so these are set up for that.  You won't need them.

CONFIG_USB_HID              'USB Human Interface Device (full HID) support'
CONFIG_USB_HIDINPUT         'HID input layer support'
CONFIG_USB_HIDDEV           '/dev/hiddev raw HID device support'
 - Given that the various USB UPSes seem to use the 'hidups' driver in NUT,
   you will almost certainly need the USB_HID option.  I just checked the
   NUT source code, and it is trying to read the /dev/usb/hid/ files, so
   the HIDDEV entry is required as well.  You probably don't need HIDINPUT,
   though; that's for keyboards, mice, and joysticks.
   HID is 'Human Interface Device', and is one of the more generic (and
   complex) protocol suites within USB.

CONFIG_USB_SCANNER
 - Obviously, if you don't have a USB scanner, you don't need this.

CONFIG_USB_SERIAL
CONFIG_USB_SERIAL_VISOR
 - You don't need these either; this lets me sync my Palm Pilot.

> Or am I missing something else? Maybe there's a package I need to
> install that works with the minimal amount of USB support I have
> compiled in? Some driver that gets installed and I need to modify
> /etc/modules.autoload or something? (Total guess which I doubt.)
> 
> Or is this possibly *only* because I haven't mounted the usbdevfs
> filesystem in my fstab? Can you supply what you have in fstab (if
> anything) to make usbview work?
> 
> Unfortunately, I have no USB devices other than two USB-based UPS's to
> use to debug this. 

   You don't need to modify the fstab; that's done in /etc/init.d/localmount
when you boot the computer.

   My guess for the absolute minimum you need turned on is as follows:

CONFIG_USB                  'Support for USB'
CONFIG_USB_DEVICEFS         'Preliminary USB device filesystem'
CONFIG_USB_LONG_TIMEOUT     'Long timeout for slow-responding devices
                             (some MGE Ellipse UPSes)'
CONFIG_USB_UHCI             'UHCI (Intel PIIX4, VIA, ...) support'
CONFIG_USB_HID              'USB Human Interface Device (full HID) support'
CONFIG_USB_HIDDEV           '/dev/hiddev raw HID device support'

> I have the 'Human Interface Devices' (normally keyboards and mice I
> thought) turned off in my kernel. When I first built Gentoo I didn't
> intend to use USB for anything and shut that off, I think. I probably
> need to turn it on and rebuild the kernel I suppose.
> 
> Thanks for your help. I'll be reading more on making USB work today.

   Not a problem.  USB is a lot more complex than it looks; it's just
very good at hiding that complexity.  But once it's set up, it's fairly
simple to use, even in Linux.  If you set Linux up for hot-pluggable
devices, and compile most of the USB devices as modules, the 'hotplug'
agent software will detect a new device being plugged in, compare the
ID code of the device against the list supplied by the driver modules,
and automatically load the module you want for that device.  This makes
USB usage mostly transparent, as long as you compile most of the devices
you may ever need as modules.

   The same 'hotplug' operation is used for PCMCIA/CardBus cards as well,
which you seemed to have turned on in your kernel.  (At least, you had
/proc/bus/pccard existing.)

   Good luck.

---------------------------+---------------------------------------------------
Bryan Feir           VA3GBF|"The professor holds the keys to the gates of
Home:[EMAIL PROTECTED]   | knowledge; not to let the student in, but to let
                           | him get out and on to better things." -- Leacock
---------------------------+---------------------------------------------------

--
[EMAIL PROTECTED] mailing list

Reply via email to