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

Aaron S. Joyner aaron at joyner.ws
Thu Oct 14 11:33:17 EDT 2004


Brian Henning wrote:

>... there's a very experimental Energizer
>driver (version 0.01 -- what does that tell you...), along with some other
>more generic USB drivers.
>  
>
Actually, you'll find that most of the 'experimental' drivers in the nut 
distribution do their job just fine.  The entire project seems to be 
version-shy.  Of course, test before going anywhere near a production 
box with it, it may eat your children, but my experience has been that 
those experimental versions are usually just fine.

>  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:
>  
>
If usb is built into the kernel, you won't see them listed as modules, 
and you'll get the "looks right" results that you see.  Apparently since 
you don't know what's in the kernel, you're using a stock binary kernel 
from one of the distributions.  Which distro and which kernel version - 
perhaps someone can look for you or knows off-hand, what the setup of 
USB is for your machine.

>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
>  
>
The first device you listed was the OHCI adapter -- not your device.  
The one I've included above is your device, which appears to be assigned 
to device number 3 (DEV#=3).

>So, is USB a built-in in the 2.6 kernel?
>  
>
Sure looks like it.

>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?
>
Right.  If they're there, you don't need to create them.

>  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?
>  
>
ls -l /dev/usb/hid/

The ls column which normally displays the size of a file, will display 
the major and minor mode numbers.

>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")
>  
>
Here, you're on your own.  Dunno why it isn't working, could be any of a 
number of things, but you're on the right track thus far I think.  Are 
you sure your device is supported by the driver in question?

Best of luck!

Aaron S. Joyner



More information about the TriLUG mailing list