Hi All, I am attempting to communicate with a USB device called the Labjack under Linux. Several other people have posted questions related to this device before, but thus far, it does not appear that anyone has met with success.
I've done some research on the Labjack, on USB, and on USB under Linux. I am now in need of some direction to help me focus my efforts along the correct path. I'm going to stay focused on the "USB" aspects of the device. If you would like more information about the device in general, check out http://www.labjack.com/. Using "usbview" I can see the device on the bus. The important characteristics are: o Low speed device. o One configuration. o One interface. o Two endpoints, one input, one output, both of type interrupt. o Registers as a HID device (more info on this below). I have attached the entire output of usbview at the end of this message for those who are interested. My kernel version is built from the Debian source of 2.4.20 w/ Con Kolivas desktop patch. I referenced the 2.4.20 source while researching the USB subsystem. I have done some basic research into communicating with the device using the following methods: o libusb: I looked into libusb, but it does not appear to handle "interrupt" endpoints at this time. It appears there are some plans to handle "interrupt" endpoints in the new version, but the code has not yet been written. Therefore, this does not appear to be an option. o hiddev: When I plug in the device, the hiddev driver claims the interface. I have successfully queried information via the hid device. I am able to perform some basic operations such as list the "reports" which I've provided at the end of this post if anyone wants to help me interpret them, but I've had little success beyond that. I was able to retrieve the reports using a code snippet found in the header file. I've had a tough time finding documentation or examples related to the hiddev interface. I've glance through the kernel source and it appears that I may have the same problem with hiddev as with libusb. I saw no support in hiddev for an output interrupt endpoint. Can anyone confirm or deny this? o usbdevfs: I have also tried to use the generic USB devfs interface to communicate with the device. I am able to obtain the same basic information which usbview provides, but I am unable to communicate with the endpoints. I have attempted to created an URB and submitted it with the SUBMITURB ioctl(), but I have not had any success with the REAPURB ioctl(). When I call REAPURB, the call blocks indefinitely. NOTE: I must remove the hid module before using usbdevfs. When I do this, I sometimes get an Oops. Not sure if I'm doing something wrong or if it is a bug. If anyone is interested in this, but I can provide more information. o kernel device driver: This is a possible last option. I have not investigated this extensively yet, but if none of the above options are valid for my situation I will fall-back to this as a last resort. I have some Windows source code written by the manufacture which communicates with the device. The recommend to start by retrieving the firmware version of the device. To do this, I need to send eight bytes to the device and then read eight bytes back off of the device. If I can read the firmware version, I feel that half the battle will be won. My initial question (I'm sure I'll have more in time), is simple. Which path should I be taking? Should I try to use hiddev? Should I try to use usbdevfs? Or should I go straight for the kernel device driver? Thanks for the help, Eric ----- start usbview output ---- Labjack U12 Manufacturer: LabJack Speed: 1.5Mb/s (low) USB Version: 1.10 Device Class: 00(>ifc ) Device Subclass: 00 Device Protocol: 00 Maximum Default Endpoint Size: 8 Number of Configurations: 1 Vendor Id: 0cd5 Product Id: 0001 Revision Number: 5.f5 Config Number: 1 Number of Interfaces: 1 Attributes: 80 MaxPower Needed: 100mA Interface Number: 0 Name: hid Alternate Number: 0 Class: 03(HID ) Sub Class: 0 Protocol: 0 Number of Endpoints: 2 Endpoint Address: 81 Direction: in Attribute: 3 Type: Int. Max Packet Size: 8 Interval: 10ms Endpoint Address: 02 Direction: out Attribute: 3 Type: Int. Max Packet Size: 8 Interval: 10ms ----- end usbview output ---- ----- start of hiddev output ----- hiddev driver version is 1.0.2 vendor 0x0cd5 product 0x0001 version 0x05f5 has 1 application and is on bus: 1 devnum: 8 ifnum: 0 Application 0 is 0x10000 (Generic Desktop Page) cgname: LabJack Labjack U12 report type: 1 -- report id: 0 -- number of fields: 1 report type: 1 report id: 0 field index: 7 max usages: 2 flags: 2 physical: 0 logical: 0 application: 65536 unit_exponent: 0 unit: 0 usage code: 0x400064ed usage value: 0x40027a50 usage code: 0x400064ed usage value: 0x40027a50 ----- end of hiddev output ----- -- Eric F. Sorton <[EMAIL PROTECTED]> ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel