Hi

I am attempting to implement a library that can be linked into 
applications wishing to exchange reports with HIDs (specifically UPSs) 
over the USB.

So far, it looks like I can identify the particular device on the USB 
by parsing /proc/bus/usb/devices, and then open up a channel to the 
device by invoking open("/proc/bus/usb/<bus#>/<device#") as seen in 
libusb courtesy of Johannes Erdfeldt.  Control messages are then 
sent/received by invoking ioctl() on the resulting file handle.

Is this a sound approach?  The preferred method, from what I can 
gather, seems to be using URB-oriented functions and macros in 
linux/usb.h.  The examples I have found, which are all driver modules, 
do not show how to initialize the usb_device structure - I guess they 
are set up by usbcore and received by the driver via the probe() 
callback.  Do I have to register myself as a driver, then, or is there 
some other way to initialize a usb_device?

Many thanks for any insight you can provide.

cheers,

ph



_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to