Re: Fwd: Re: USB question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Charlie,

Charlie Sager wrote:
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               1.01
>   bDeviceClass            0 (Defined at Interface level)
..
>     bNumInterfaces          1
.
>     Interface Descriptor:
>       bInterfaceClass         3 Human Interface Device
>       bInterfaceSubClass      0 No Subclass
>       bInterfaceProtocol      0 None
..
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0008  1x 8 bytes
>         bInterval              10
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0008  1x 8 bytes
>         bInterval              10

>>> The Scantool software runs under Windows just fine. However, I want
>>> to use my laptop which now has Ubuntu 12.04, with wine installed.

That does not work.


>>> I am able to start the Scantool program under wine, but the software
>>> can't communicate with any of comm ports, com1 through com10
>>> (because I get a message telling me this).

I don't know where and why you get that message, but it has nothing
to do with the actual hardware device that you have in your hand.

The USB device abuses the USB HID class, posing as a Human Interface
Device, in order to make using the device on old Windows systems as
easy as possible, specifically to avoid the need for users to install
a device driver.

The Scantool program uses a stupid file-like API to exchange bytes
with the device on Windows, but WINE doesn't (and can't neccessarily)
implement that API with the same user experience.

So you can't run Scantool in WINE to communicate with the device.

You can analyze the communication using various methods however, and
you can develop open source and portable software which communicates
with the device, but the Windows software is (partly by definition)
not really useful outside a Windows system.

If you want to read more about communication with HID class devices
from userspace then there's more information at the libusb project:

http://libusb.org/wiki/FAQ#CanIcreateadriverlessdeviceusingHIDclass

The HIDAPI library mentioned there supports among other things the
Linux hidraw API, which is what provides access to your device since
you got a new hidraw0 device node in /dev when plugging the device.

So by using HIDAPI it would actually be possible to create a similar
user experience to that on Windows. That will either have to be done
within WINE (that would be a nice and easy project for someone new to
WINE development) or in a standalone program which would then replace
Scantool completely.


Kind regards

//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux