Hello:
I have questions about GNU/Linux USB that I'm having trouble getting
answered ..... looking for some assistance!
I am an independent consultant specializing in development of USB devices &
their associated host apps. All my work to date has been in the WIN
environment but client requirements and personal interest have lead me into
the GNU/Linux world - "Desktop" and embedded - so I'm very much a newbie to
GNU/Linux but not to OS's in general.
Using Debian "Sarge"/KDE/KDevelop, LibUSB & ioctl's and loving it!
So, my questions:
1) With regard to USB in general, how does one logically detach a single
device from a built-in driver (that is, NOT physically remove it from the
system) without unloading the driver itself? Specifically, I need to detach
an MSC device from the Kernel driver so I can claim it with a custom user
mode driver (with root privileges) that allows access to a manufacturing
interface for re-configuration and diagnostics. I don't want to shut down
the Kernel driver because I want the other attached MSC devices to continue
to operate. I would need to re-attach the device to the Kernel driver at the
close of the app.
2) With regard to HID ..... There are many advantages to designing a USB
device so it binds to the HID driver, even if it's not a "traditional" HID
device. Indeed, since HID is universal across almost all host environments I
develop most custom devices that don't already fall into a pre-defined USB
class as HID class devices with a vendor defined interface so that my client
has access to most platforms without the need to distribute a driver.
So, getting to my question ...... If I may use a WIN example, on the device
I define a simple "In" buffer and a simple "Out" buffer in the report
descriptor then in the WIN app, I find the device, open it then use the
readFile() & writeFile() calls. Does the GNU/Linux HID subsystem support
such a mechanism? I prefer not to do as in (1) above ....
For reference, here is an example Report descriptor:
ReportDescriptor:
; globals, etc.
db 0x06,0xA0,0xFF ;< Usage Page (vendor defined)
db 0x09,0x01 ;< Usage (vendor defined)
db 0xA1,0x01 ;< Collection (Application)
db 0x09,0x02 ;< Usage (vendor defined)
; The Input Report
db 0x09,0x03 ;< Usage (vendor defined)
db 0x15,0x00 ;< Logical minimum (0)
db 0x26,0xFF,0x00 ;< Logical maximum (255)
db 0x75,0x08 ;< Report size (8 bits)
db 0x95, in_report_size ;< Report count(X bytes, X<255)
db 0x81,0x02 ;< Input (Data, Variable,
Absolute)
; The Output Report
db 0x09,0x04 ;< Usage (vendor defined)
db 0x15,0x00 ;< Logical minimum
db 0x26,0xFF,0x00 ;< Logical maximum
db 0x75,0x08 ;< Report size (8 bits)
db 0x95, out_report_size ;< Report count(X bytes, X<255)
db 0x91,0x02 ;< Output (Data, Variable,
Absolute)
db 0xC0 ;< End Collection (Application)
ReportDescriptorEnd:
Any assistance you could offer would be GREATLY appreciated.
Thank You!
Phil Drain
Binary Technologies, Inc.
Salem, Oregon
[EMAIL PROTECTED]
(503) 581-7592
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel