[TriLUG] USB on a 2.6 Kernel, mknod, etc..

Brian Henning brian at strutmasters.com
Thu Oct 14 09:54:34 EDT 2004


Hi Gang,
  I'm still chasing the USB UPS monitoring rabbit.  Turns out that with the
nut distribution (thanks Aaron), there's a very experimental Energizer
driver (version 0.01 -- what does that tell you...), along with some other
more generic USB drivers.
  Thing is..  The manpage that comes with the Energizer driver mentions
needing the following kernel modules loaded: hid, usb-uhci, and usbcore.
None of those exist anywhere on my system, yet cat /proc/bus/usb/devices
yeilds the following "looks-right" results:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 4
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.8-1.521 ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=0000:00:07.4
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0f03 ProdID=0001 Rev= 0.01
S:  Manufacturer=Ver 1.0
S:  Product=USB To RS232 Interface (V1.0) BaudRate 2400bps
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

So, is USB a built-in in the 2.6 kernel?

The manpage in question also mentions the hiddev special devices being in
/dev/usb/hid/ instead of /dev/usb/, and suggests using mknod to create the
hiddev devices.  But if they're already present in /dev/usb/, I shouldn't
need to create them in /dev/usb/hid/, as long as I provide the correct path,
right?  An apropos nod didn't reveal a command to easily see what the type,
major, and minor for an already existing special device..  How can I check
to see that an existing special device is correctly created?

The particular error I'm getting when trying to start the Energizer monitor
driver is "Cannot communicate with UPS at /dev/usb/hiddevN" where N is any
of 0, 1, 2, 3 that I've tried so far.
(This particular error varies in language across the different available UPS
USB drivers, including "hiddev path open /dev/usb/hiddevN: No such device"
and simply "No USB/HID UPS found")

Is there a way to verify with any certainty which /dev/usb/* device actually
correctly corresponds to the physical device that is plugged in?  There's 16
of the hiddev buggers, and I don't relish the idea of going through all 16
especially if it might mean they ALL don't work as I expect.

I'm probably missing something..  Any more hints?

Thanks as always,
~Brain



----------------
Brian A. Henning
Strutmasters.com
866.597.2397
----------------





More information about the TriLUG mailing list