PORTS Forum
Ports and Interfaces => USB => Topic started by: androjes on January 13, 2011, 01:20:03 pm
-
Hello every body.
My goal is to send control transfer (specific command) to the device which is managed by the usbvideo.sys driver (UVC).
After long research, I've saw 2 solutions:
1- Using libusb as upper filter driver. it works well but my problem is how to include libusb-filter in the INF file as the upper filter above the usbvideo.sys?
2- I plan to use DeviceIOControl but I don't really know what code control to use?
Could someone give me one working sample or some help.v
Thanks...
-
No answer.
Does someone know how to send URB request (UsbBuildVendorRequest) from user mode with C#.NET.
Thanks
-
The libusb forum is probably a better place for advice specific to libusb. If you're using a vendor-defined driver, you define the DeviceIoControl codes as allowed by the driver's API.
Jan
-
I'm using the usbvideo.sys video class driver (provided by windows).
So I don't know what control code to use :'(. I want to use "USBUSER_OP_SEND_RAW_COMMAND" but i's not documented Someone else have a sample of this?
Thanks.
-
It's documented here:
http://msdn.microsoft.com/en-us/library/ff537344%28VS.85%29.aspx
USBUSER_OP_SEND_RAW_COMMAND
Do not use this request.
What are you trying to accomplish on the video device?
Jan
-
>It's documented here:
>http://msdn.microsoft.com/en-us/library/ff537344%28VS.85%29.aspx
>USBUSER_OP_SEND_RAW_COMMAND
>Do not use this request.
The documentation is not enough. Even Windows don't recommend to use this request. The format of data (after the HEADER) is not defined.
>What are you trying to accomplish on the video device?
I just want to send a control transfer (EP0) through video class driver (usbvideo.sys).
-
>I just want to send a control transfer (EP0) through video class driver (usbvideo.sys).
For what purpose? Maybe you can accomplish the same thing at a higher level with DirectShow.
Jan
-
>For what purpose? Maybe you can accomplish the same thing at a higher level with DirectShow.
I want to send vendor command to my device (access to register of sensor). So I don't think that directshow can do that ???
-
If it's a vendor-defined command, you need to provide a vendor-defined driver to support it.
Jan
-
>If it's a vendor-defined command, you need to provide a vendor-defined driver to support it.
I couldn't develop a driver like usbvideo.sys. I just want to extend its functionality which can allow to send control transfer from user space.
My last solution is installing "libusb-win32" as filter driver of usbvideo.sys and I'll use LibUsBDotNet for sending control transfer from my application.
My problem now is to write the corresponding INF file ??? ??? ???
Thanks Jan.
-
If you download the latest libusb-win32 release, you can use the GUI filter wizard to install the filter driver to that specific device. You do not need an inf file.
Take note that libusb-win32 filter may not work with some device and according to some driver experts that it has no future. BTW, I am one of the admins of libusb-win32 project.
The other way is to change the firmware and have one extra interface without any endpoints. Use WinUSB (or libusb-win32 device driver) for that interface for the vendor specific control transfer.