On Wed, Feb 19, 2014 at 6:09 PM, wrote: > Hi, > > I have an usb device with 3 endpoints for HID and debug data. What do you mean by HID and debug data? You may want to post the USB descriptor of your device. > I want to read data from debug endpoints while not break the > HID functions. What can I do in this case? I have tried some > generic driver but they replace my original HID driver. > > Can I have a driver which sit bellow hidusb.sys to open > debug endpoints and feed data to the user layer while still > forward HID data to upper layer (HID)? Your subject talks about libusb. Which libusb you are talking about? If your device is an HID device and you want to use libusb, you can use libusb Windows backend (libusb-1.0 API) which works with the HID driver with some limitations (without the need to use the generic WinUSB driver to replace the HID driver). You should not use libusb-win32 (libusb-0.1 API) which does not directly with HID device. Libusb Windows backend: But the better solution is not to use libusb but rather HIDAPI. > What do you mean by HID and debug data? You may > want to post the USB descriptor of your device. I don't have the device yet, just the requirements from my partner. They have some endpoints for bulk transfer with libusb beside HID endpoints. Everything work fine on Linux. Now they want port it to Windows. With original HID driver they can't do bulk transfer on debug endpoints so they use Zadig to install some generic driver which break the HID functions. > If your device is an HID device and you want to use > libusb, you can use libusb Windows backend (libusb-1.0 > API) which works with the HID driver with some > limitations So this backend can do bulk transfer on HID device which have some bulk endpoints without generic USB driver? Thank you very much! [email protected] wrote: > I have an usb device with 3 endpoints for HID and debug data. You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. 1 RaspberryPI 1 Moving Head Baby LED 1 DMX512 1 USB cable 1 JoyStick Dilong recommend install Raspbian. Tar xfvz libftd2xx1.1.12.tar.gz. This unpacks the archive, creating the following directory structure: build. Cd build/arm926. I want to read data from debug endpoints while not break the HID functions. What can I do in this case? I have tried some generic driver but they replace my original HID driver. There are two RIGHT answers to this problem. One is to move the debug endpoint into a separate interface. That requires nothing in the device other than a change to the configuration descriptor. I've tried using both motioninjoy AND libusb. On the lilypad settings on PSCX2 it registers button presses but not analogue movement? Desperately in need of goon support here. In motion joy I usually select the last dualshock 3 option and click the link to the right of it when scroll down all the way to the. [PyPM Index] libusb1 - Pure-python wrapper for libusb-1.0. ![]() As it is, your debug endpoint is not compliant with the USB HID spec. The other is to skip the debug endpoint, and add another top-level collection to your HID descriptors for the debug management. > Can I have a driver which sit bellow hidusb.sys to open debug endpoints and feed data to the user layer while still forward HID data to upper layer (HID)? You would have to use an upper filter to hidusb.sys, otherwise your custom requests would get blocked by hidusb. Your upper filter can send URBs directly to the PDO. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. [email protected] wrote: >> If your device is an HID device and you want to use >> libusb, you can use libusb Windows backend (libusb-1.0 >> API) which works with the HID driver with some >> limitations > So this backend can do bulk transfer on HID device which have some bulk endpoints without generic USB driver? I'm not convinced that will work. The HID backend to libusb is a wrapper around the Windows HID API, but I'm not sure it allows you to access non-HID endpoints directly. Xiaofan would know that better than I. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. On Wed, Feb 19, 2014 at 10:34 PM, wrote: >> If your device is an HID device and you want to use >> libusb, you can use libusb Windows backend (libusb-1.0 >> API) which works with the HID driver with some >> limitations > > So this backend can do bulk transfer on HID device which > have some bulk endpoints without generic USB driver? As Tim mentioned, the libusb Windows HID backend is a wrapper on top of the Windows HID API, so it will only work with the HID side (control and interrupt endpoints) and not a bulk endpoints. I think Tim's first approach is the way to go for you. Move the debug endpoint (bulk endpoint) out of the HID interface and into a separate debug interface. Then you can use libusb for that debug interface. [email protected] wrote: > I also think Tim's first approach is the best way. Unfortunately my partner don't want to change the device (they have no control over it). What they've done does not meet the HID class spec. They should be concerned. > I think we can create a virtual usb device and forward debug data from the real device to it so libusb can work properly. Is it possible or any better solution? No, that's a lot of work for nothing. Just write a lower filter driver to HIDUSB and have it expose its own device object with a custom interface. If you don't have a real USB interface to control, then there's no point in bringing libusb into the picture. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. > What they've done does not meet the HID class spec. They should be concerned. You are right, I also think they had been make a wrong decision from the beginning. > No, that's a lot of work for nothing. Just write a lower filter driver to HIDUSB and have it expose its own device object with a custom interface. If you don't have a real USB interface to control, then there's no point in bringing libusb into the picture. Yes, but they already have a lot of code that run fine on Linux. If we provide a custom interface, then they must replace some module (I hope they don't use libusb directly). What I wonder now is the possibility of the 'virtual usb interface' solution. If we can easily do it so just do it, otherwise if it take too much effort compare with changing the legacy code base so we will make a custom interface. [email protected] wrote: >> No, that's a lot of work for nothing. Just write a lower filter driver to HIDUSB and have it expose its own device object with a custom interface. If you don't have a real USB interface to control, then there's no point in bringing libusb into the picture. > Yes, but they already have a lot of code that run fine on Linux. If we provide a custom interface, then they must replace some module (I hope they don't use libusb directly). What I wonder now is the possibility of the 'virtual usb interface' solution. If we can easily do it so just do it, otherwise if it take too much effort compare with changing the legacy code base so we will make a custom interface. It's almost always more work to simulate some other interface than it is to invent a new one. Whatever you do will have to be a bus driver. You'll have to create a PDO for libusb to grab. You could have the device ID of the PDO match your USB device with, for example, &MI_01 added to simulate a separate interface. However, since there's only one interface in real life, you would have to monitor all of the SetConfiguration and SetInterface requests that go through to make sure one side doesn't shut things off while the other side is alive. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. Posting Rules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |