Questions tagged [winusb]

Windows USB (WinUSB) is a generic driver for USB devices that was developed concurrently with the Windows Driver Frameworks (WDF) for Windows XP with SP2.

The WinUSB architecture consists of a kernel-mode driver (Winusb.sys) and a user-mode dynamic link library (Winusb.dll) that exposes WinUSB functions. By using these functions, you can manage USB devices with user-mode software.

Winusb.sys is also a key part of the link between a UMDF function driver and the associated device, and is installed in the device's kernel-mode stack as an upper filter driver. An application communicates with the device's UMDF function driver to issue read, write, or device I/O control requests.

The driver interacts with the framework, which passes the request to Winusb.sys, which then processes the request and passes it to the protocol drivers and ultimately to the device. Any response returns by the reverse path. Winusb.sys also serves as the device stack's Plug and Play and power owner.

More details: MSDN

132 questions
10
votes
1 answer

Software based Android accessory on Windows

I would like to turn my computer into an Android accessory using my application. So instead of a specialized hardware this will be just PC that will switch the phone into accessory mode, thus launching some Java app on the phone associated with the…
lacop
  • 2,024
  • 4
  • 22
  • 36
10
votes
1 answer

WinUSB driver on Windows 10 IoT

I'm trying to use the WinUsb.sys driver that comes with Windows (including Windows 10 IoT of Raspberry Pi 2). Using devcon.exe I can see that the USB I'm trying to use is connected (it is named USB\VID_1234&PID_ABCD\5&3753427A&0&4), but I don't know…
TheHvidsten
  • 4,028
  • 3
  • 29
  • 62
10
votes
1 answer

Support WinUSB in Device Firmware

I'm trying to set up a USB device to automatically use WinUSB as the driver when it is connected to a Windows 8 machine, as outlined here. It says: In order for the USB driver stack to know that the device supports extended feature descriptors, the…
Jeremy Sigrist
  • 325
  • 2
  • 11
9
votes
2 answers

When should a USB device send a ZLP on a bulk pipe?

I'm writing firmware for a USB 2.0 full speed device that communicates with a WinUSB host, with one Bulk Pipe in each direction. When should the device send a zero-length packet (ZLP) to terminate an IN transfer, and how does it know that it…
cp.engr
  • 2,291
  • 4
  • 28
  • 42
9
votes
5 answers

Windows 10 - clean out USB enumeration/driver cruft

Summary I'm developing firmware and a PC test application for a custom USB device, using the STM32F072 Discovery board. The device includes Microsoft Windows Compatible IDs (WCIDs) to enable automatic installation of the WinUSB driver on the PC. The…
cp.engr
  • 2,291
  • 4
  • 28
  • 42
8
votes
1 answer

Replace Windows USB Class Driver with a custom driver?

I wonder if anyone can help at all, a bit of a specialist problem this. I have an application that needs to read and analyse a number of USB devices (not simultaneously, they are each run in seperate tests and could in theory be run on different…
Richard Baxter
  • 1,317
  • 1
  • 15
  • 24
8
votes
4 answers

How to install ADB driver for any android device?

I am an android developer. I have a new HTC Inspire 4g phone but I don't know how to install usb driver for it. This is my android_winusb.inf file: ; ; Android WinUsb driver installation. ; [Version] Signature = "$Windows NT$" Class …
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
8
votes
2 answers

Windows 10 WebUSB printing issues with Zebra LP2844 DOMException: Access denied

In a project I'm trying to use the WebUSB API available in Chrome to print using a Zebra LP2844 printer. I succeeded on OSX without issues and eventually on Ubuntu and on ChromeOS thanks to this post that talked about unbinding the kernel driver so…
jmrodriguez
  • 151
  • 2
  • 9
8
votes
4 answers

How to work with WinUSB?

This is a follow-up to my previous question, Need to write driver for USB peripheral device? Background I'm working on designing a USB peripheral using an STM32 microcontroller (bare metal / no OS). The device will occasionally be connected to a…
cp.engr
  • 2,291
  • 4
  • 28
  • 42
6
votes
2 answers

C# WinUSB Can't Call CloseHandle on Interface

I am trying to release a handle to the USB interface with CloseHandle. The exception I get is: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. at …
Christian Findlay
  • 6,770
  • 5
  • 51
  • 103
6
votes
1 answer

Does calling of methods and functions

I have a question regarding calling methods from different threads. Well I am using WinUSB driver to communicate with USB device. I have separate thread to read data from device. Commands to device are set within main thread. Actually I am using…
Nix
  • 581
  • 5
  • 20
5
votes
2 answers

Compiling an application that uses WinUsb

I am in the process of writing an application to communicate with Usb devices using WinUsb.dll. This is a user-mode library that allows communication with a device through winusb.sys installed as its driver in the kernel. I am writing this…
joshperry
  • 41,167
  • 16
  • 88
  • 103
5
votes
1 answer

Windows PC as USB Host communicating over USB with Android Device

i would like to transfer data (programmatically) over USB from an Android App to a Server on a Windows PC. I´ve searched the web for over 3-4 days and couldn´t find any sample code, etc. Is there any way to realize this in Java, C#, etc? I´ve…
user1900863
  • 69
  • 2
  • 5
4
votes
0 answers

How can I prevent "Eject " appearing after installing a WinUSB-based device?

Summary I'm developing an installer for an application that involves installing a USB device based on WinUSB. Everything works except for an annoying issue in which the USB device shows up in the notification pane after installation with the option…
Tagc
  • 8,736
  • 7
  • 61
  • 114
4
votes
0 answers

Sending USB vendor specific commands to USB HUB?

I have USB 2.0 HUB which I can program, when I connect the HUB to my PC, WINDOWS recognize it as standart USB 2.0 HUB ,and I see in the device manager that "iusb3hub.sys" is the driver. is there any simple way to send "vendor specific" commands to…
Itai Ofir
  • 41
  • 2
1
2 3
8 9