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
2
votes
2 answers

USB device prototype timeouts with WinUSB or HID drivers, works fine with libusb

I'm trying to create a prototype for an USB (1.1) HID device using an Arudino board and a CH376 module. I have managed to write the Arduino code that sets the CH376 in device mode and handles all the USB transactions. As long as I declare the device…
Konamiman
  • 49,681
  • 17
  • 108
  • 138
2
votes
1 answer

WinUsb_Initialize error 8 - ERROR_NOT_ENOUGH_MEMORY

I am trying to read usb devices on Windows 10, following this two pages using-winusb-api-to-communicate-with-a-usb-device and WinUSBCommTest.cpp, but when I try to run this code, WinUsb_Initialize fails for windows error 8, ERROR_NOT_ENOUGH_MEMORY.…
Qingfu Wen
  • 41
  • 6
2
votes
1 answer

WebUSB and driver for Windows

I want to use WebUSB with libusbK on Windows. It looks like WebUSB works with WinUSB driver only. I couldn't make it work with libusbK. I searched for a detailed paper but couldn't find anything. I don't see any information about this at…
zlyh
  • 21
  • 3
2
votes
0 answers

How do you deploy a Winusb application in C++?

I've developed a C++ console program to communicate with a microcontroller board using a Winusb template in Visual Studio 2017. My program is in 2 parts, a USB application using WindowsApplicationForDrivers10.0 platform which is a dll. The 2nd…
ADB
  • 21
  • 1
2
votes
0 answers

Install a WinUSB driver

We have an application which uses an off-the-shelf Bluetooth USB dongle (CSR8510-A10). Unfortunately, our app needs better control over the BLE hardware than Windows generic driver can provide. Our solution was to write our own BLE-HCI code, which…
bavaza
  • 10,319
  • 10
  • 64
  • 103
2
votes
2 answers

multiple architectures, winusb and wix

I am creating an installer for an application which includes a WinUSB device driver. I am using WiX 3.5 with the difx extension. According to the WinUSB how-to I can create a single inf file that will work for x86, ia64 and amd architectures.…
Peter Hull
  • 6,683
  • 4
  • 39
  • 48
2
votes
2 answers

I have a DEVINST, I need the Device Path

I'm trying to open a WinUSB device that is part of a composite device. I have located the correct child device using cfgmgr32, and have its DEVINST number. In order to open it with WinUSB, I need to first call CreateFile, for which I need the Device…
shogged
  • 281
  • 2
  • 10
2
votes
1 answer

Why can't I get full bandwidth from WinUsb_ReadIsochPipeAsap?

I have multiple WinUsb_ReadIsochPipeAsap in flight at a time and always queue the next one as soon as WinUsb_GetOverlappedResult succeeds for the first. According to the documentation: WinUsb_ReadIsochPipeAsap allows the USB driver stack to choose…
Ben Jackson
  • 90,079
  • 9
  • 98
  • 150
2
votes
1 answer

Getting error 87, incorrect parameter for SetupDiGetDeviceInterfaceDetail

I keep getting the Windows error 87 while calling the SetupDiGetDeviceInterfaceDetail (https://msdn.microsoft.com/en-us/library/ff551120.aspx), I keep getting the error even when I switch all the optional parameters to NULL, but I use the two first…
sh5164
  • 276
  • 2
  • 15
2
votes
1 answer

USB (WinUsb) isochronous bandwidth management

I've been experimenting with isochronous USB transfers using WinUsb, and it turns out that WinUsb always sends data as fast as possible: WinUsb_WriteIsochPipe packetizes the transfer buffer so that in each interval, the host can send the maximum…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
2
votes
0 answers

What Android USB driver can I use to communicate with a device that implemented WinUSB.sys

I am about to write an Android application that will communicate with a device through USB. The device has implemented WinUSB.sys. Is there any ready made USB lib that I can use in order to avoid writing my own USB driver for Android? I haven't got…
2
votes
1 answer

WinUSB Tutorial from MSDN Microsoft

I've been faced with problem to follow this tutorial of Write a Windows desktop app based on the WinUSB template from MSDN of Microsoft. Following the instructions, in the step where we need to create an WinUSB Application, the website tell us that…
Duds
  • 125
  • 7
2
votes
1 answer

How can I install the INF driver without the [DefaultInstall] section from a .NET desktop application?

I have created a driver for a composite device (hardware ID with an MI_## part) based on WinUsbDriver. The point is that "template" does not contains the [DefaultInstall] section, for that reason I can't P/Invoke InstallHinfSection…
denys-vega
  • 3,522
  • 1
  • 19
  • 24
2
votes
0 answers

ERROR_SEM_TIMEOUT when using WinUSB WritePipe

I often get ERROR_SEM_TIMEOUT errors using the WinUSB WritePipe function. This would seem to indicate that there is a timeout, but if I wait a period of time and try again I'm never able to write. I'm writing in 64 byte chucks to the USB device…
Ted1391
  • 139
  • 3
  • 12
2
votes
0 answers

How to create a WinUSB-based driver that reads data from a bulk endpoint as fast as possible

I'm trying to write code to make it so that a microcontroller can communicate over USB with a PC. I think that the majority of the code is in place, and communication generally works fine so long as it's slow (> ~5ms per message). However, I'd like…
Tagc
  • 8,736
  • 7
  • 61
  • 114
1 2
3
8 9