beautypg.com

APC UPS control system User Manual

Page 216

background image

### END ###

Interpretation of /proc/bus/usb info on 2.6 kernels:

/proc/bus/usb filesystem output
===============================
(version 2003.05.30)

The usbfs filesystem for USB devices is traditionally mounted at
/proc/bus/usb.

It provides the /proc/bus/usb/devices file, as well as

the /proc/bus/usb/BBB/DDD files.

**NOTE**: If /proc/bus/usb appears empty, and a host controller

driver has been linked, then you need to mount the
filesystem.

Issue the command (as root):

mount -t usbfs none /proc/bus/usb

An alternative and more permanent method would be to add

none

/proc/bus/usb

usbfs

defaults

0

0

to /etc/fstab.

This will mount usbfs at each reboot.

You can then issue ‘cat /proc/bus/usb/devices‘ to extract
USB device information, and user mode drivers can use usbfs
to interact with USB devices.

There are a number of mount options supported by usbfs.
Consult the source code (linux/drivers/usb/core/inode.c) for
information about those options.

**NOTE**: The filesystem has been renamed from "usbdevfs" to

"usbfs", to reduce confusion with "devfs".

You may

still see references to the older "usbdevfs" name.

For more information on mounting the usbfs file system, see the
"USB Device Filesystem" section of the USB Guide. The latest copy
of the USB Guide can be found at http://www.linux-usb.org/

THE /proc/bus/usb/BBB/DDD FILES:
--------------------------------
Each connected USB device has one file.

The BBB indicates the bus

number.

The DDD indicates the device address on that bus.

Both

of these numbers are assigned sequentially, and can be reused, so
you can’t rely on them for stable access to devices.

For example,

it’s relatively common for devices to re-enumerate while they are
still connected (perhaps someone jostled their power supply, hub,

215