Quantcast
Channel: WinUsbNet: A managed interface to WinUSB.sys
Viewing all 20 articles
Browse latest View live

Created Release: WinUsbNet Executables and Help Installer (Feb 19, 2012)

$
0
0
This is a Windows installer (.msi) that includes all the components needed for WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbTest. It also installs complete documentation of the class library as an HTML Help file and the main source file for WinUsbTest as an example.

Updated Release: WinUsbNet Executables and Help Installer (Feb 19, 2012)

$
0
0
This is a Windows installer (.msi) that includes all the components needed for WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbTest. It also installs complete documentation of the class library as an HTML Help file and the main source file for WinUsbTest as an example.

Updated Release: WinUsbNet (Feb 19, 2012)

$
0
0
WinUsbNetInstall.msi is a Windows installer that includes all the components needed for WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbTest. It also installs complete documentation of the class library as an HTML Help file and the main source file for WinUsbTest as an example.

WinUsbNet.chm is the HTML help by itself. This is quick download to get you more detailed information before deciding to use the class library.

Updated Release: WinUsbNet (Feb 19, 2012)

$
0
0
WinUsbNetInstall.msi is a Windows installer that includes all the components needed to use WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbTest. It also installs complete documentation of the class library as an HTML Help file and the main source file for WinUsbTest as an example.

WinUsbNet.chm is the HTML help by itself. This is quick download to get you more detailed information before deciding to use the class library.

WinUsbNet.zip is the whole enchilada. All the source code and VS2008 project files, including help example and the installer.

Updated Release: WinUsbNet (Feb 19, 2012)

$
0
0
WinUsbNetInstall.msi is a Windows installer that includes all the components needed to use WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbTest. It also installs complete documentation of the class library as an HTML Help file and the main source file for WinUsbTest as an example.

WinUsbNet.chm is the HTML help by itself. This is quick download to get you more detailed information before deciding to use the class library.

WinUsbNet.zip is the whole enchilada. All the source code and VS2008 project files, including help example and the installer.

Released: WinUsbNet v. 1.0.0 (Feb 21, 2012)

$
0
0
WinUsbNetInstall.msi is a Windows installer that includes all the components needed to use WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbNet Test App. It also installs complete documentation of the class library as an HTML Help file and the main source file for the WinUsbNet Test App as an example.

WinUsbNet.chm is the HTML Help by itself. This is quick download to get you more detailed information before deciding to use the class library.

WinUsbNet.zip is the whole enchilada. All the source code and VS2008 project files, including help example and the installer.

Updated Release: WinUsbNet v. 1.0.0 (Feb 21, 2012)

$
0
0
WinUsbNetInstall.msi is a Windows installer that includes all the components needed to use WinUsbNet. It installs executables for the USB INF Builder, the device driver installer, Microsoft's WinUSB driver installer, the WinUsbNet class library DLL, and the sample application WinUsbNet Test App. It also installs complete documentation of the class library as an HTML Help file and the main source file for the WinUsbNet Test App as an example.

WinUsbNet.chm is the HTML Help by itself. This is quick download to get you more detailed information before deciding to use the class library.

WinUsbNet.zip is the whole enchilada. All the source code and VS2008 project files, including help example and the installer.

Updated Wiki: Home

$
0
0
Project Description
The WinUsbNet class library gives .NET managed code direct access to USB devices through WinUSB, the generic USB device driver included with Windows. The project also includes tools to create & install WinUSB installation files, and a sample application.

Purpose

This project is intended for developers who are creating their own USB device. Using WinUsbNet eliminates the need to understand anything about Windows device drivers. If you know what a USB endpoint is and can use the .NET Framework classStream, you know enough to transfer data between your application and your USB device.

This project could also be useful for someone who wants to make their own interface to an existing USB device. You will need to understand the data transfer protocols of the target device.

Project Components

  • USB INF Builder creates the Windows device driver installation file (INF) that makes WinUSB the device driver for a given USB device.
  • Microsoft's installer for WinUSB is included, both 32-bit and 64-bit.
  • DeviceInstall, the device driver installer, registers the INF with Windows and makes sure WinUSB is installed.
  • The WinUsbNet class library provides the interface between your application and the USB device. Complete documentation of the library in HTML Help is included.
  • The WinUsbNet Test App is a sample application that lets you set up small data transfers with the USB device.

Updated Wiki: Documentation

$
0
0

The WinUsbNet class library and associated tools greatly simplify creating a .NET managed application that can communicate directly with a USB device. The recommended download is an MSI installer package that installs the class library, tools, and device driver binaries as well as HTML Help and sample code. (In this context, "install" of the class library and device drivers simply means copying them to your machine, not mucking with the GAC or OS.) While full source code is available, the intention is that the documentation and examples will be all you need to understand how to use the library and tools.

Installation of WinUsbNet creates a WinUsbNet program group on the Start Menu. Once you have installed the basic package, here are the steps to get your USB device talking:

  1. Use the USB INF Builder to create the necessary device driver installation file (INF). This tools provides a GUI to collect basic information about your USB device, such as Vendor ID (VID) and Product ID (PID). You will also use it to create a new GUID that is used to identify your device by WinUSB; you should copy the GUID to the clipboard for later use. The tool inserts the information into a template when you useCreate INF on the File menu. (Note that File Save does not create the INF, it just saves the raw data for future use.) The INF should be placed in the Drivers folder of the WinUsbNet installation (e.g., C:\Program Files (x86)\WinUsbNet\Drivers).
  2. Open a command prompt on the Drivers folder. This folder contains the DeviceInstall.exe tool as well as the INF you just created. From the command prompt, run DeviceInstall with your INF as an argument. For example:

    DeviceInstall MyUsbDev.inf

    You should ignore any warning that the device driver is not signed.

    If you will be making an installer for end users, the installer should install the Drivers folder and run DeviceInstall.exe in this manner.

  3. Connect your USB device. You can skip a check for an updated driver from Windows Update. If all goes well, you should find your USB device in Device Manager under Universal Serial Bus controllers, with the product name assigned by the USB INF Builder.
  4. To test, start the WinUsbNet Test App (from the WinUsbNet  program group on the Start menu). Paste the GUID from Step 1 into theUSB Device GUID box and click the Find button. The test app should report “Device attached” in its output window. The Endpoint dropdown will list all the available endpoints on the device and their direction. You can now perform control transfers or simple I/O on the endpoints.
  5. To create your own application, add a reference to WinUsbNet.dll (e.g., C:\Program Files (x86)\WinUsbNet\WinUsbNet\WinUsbNet.dll). The first task for your application will be to create aWinUsbManager object using the GUID from Step 1. After that, refer to the WinUsbNet Help which can also be started from the program group. You will also find a shortcut to the main source file for the WinUsbNet Test App, which demonstrates using the class library, particularly in its btnXfer_Click event handler.

See Also:
USB INF Builder
WinUsbNet Test App

Updated Wiki: USB INF Builder

$
0
0

Using the USB INF Builder

BuildInfScreen

Just fill in the blanks. Each item includes an explanation in the help region at the bottom. You should create a new GUID, then use the clipboard to copy that GUID into your application source code.

The output file path should be in the Drivers folder of the WinUsbNet installation. This folder has subfolders with Microsoft’s installers for WinUSB.

You can save the data you enter using the Save command on theFile menu. This makes it easy to make changes later. You actually create the INF with theCreate INF command on the File menu, or by using theBuildInf button on the toolbar.

The USB INF Builder can also create an INF for a device that will appear as a serial port using the standard windows driver UsbSer.sys. This requires that the device adhere to the USB specification for the Communication Device Class (CDC) using Abstract Control Management (ACM).

Updated Wiki: WinUsbNet Test App

$
0
0

Using the WinUsbNet Test App

WinUsbTestScreen

To use the WinUsbNet Test App, first copy & paste the GUID that WinUSB uses to identify the device. If you used the USB INF Builder, copy the GUID from there. Clicking theFind button will cause a search for any matching devices already attached. The app will also track as devices are attached and detached.

Tooltips are used to explain the usage of each element on the interface. Take a moment to hover the mouse over the various controls. Controls can become enabled or disabled depending on the endpoint and direction selected.

To transfer data, select an endpoint from the dropdown. Most endpoints are eitherIn or Out, but as shown in the screenshot, it is possible for a single endpoint to be both. To read data from anIn endpoint, just set the number of bytes to read in the Read Length box (decimal) and click the Transfer Data button. The data will show up as hex bytes inblue in the output window. To send data to an Out endpoint, enter the data in the Out Data (hex) text box as a sequence of hex bytes separated by spaces, then click theTransfer Data button. The data you send will be displayed in the output window ingreen.

If relevant to your application, you can perform a USB control transfer by selecting “Control” from the Endpoint dropdown. This will enable the group box labeled Control Transfer (hex values), where you can enter the specifics. You will need to understand USB control transfers, although some basic help is available in tooltips.

New Post: HID device not found

$
0
0

Hello !

I just tried your lib and used the example app. I paste-in the

GUID of the HID class, but my device - which is working - was

not found. Any help would be great.

Btw, I found it ugly to beeing forced to specify a GUID.

The most libs, I found so far, use PID/VID of a device

to identify it. Would it be easy to change the WinUsbManager

manager class to search devices that way ??

 

Thanks anyway.

++mabra

Source code checked in, #22734

Source code checked in, #22735

$
0
0
Upgrade: New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link: http://go.microsoft.com/fwlink/?LinkId=254563

New Post: creating and sending input on in-point for Generic HID mouse device and how to create?

$
0
0
I would like to create a Generic HID mouse device (the driver is already built into windows) and send input on the in-endpoint to it. Is this possible without using an INF and programmatically creating an instance of the device.

New Post: HID device not found

$
0
0
Same problem here. I'm using the HID driver, I got the GUID for it, but WinUSBNet doesn't find it. What can I do? I must create an own driver?

New Post: HID device not found

$
0
0
WinUSB is not for HID's. There is an HID driver and API for that.

New Post: HID device not found

New Post: Unplugged device

$
0
0
Hi...I don't know if this project is still active, but I just tried it and it works well except if the device I'm reading/writing is unplugged while communicating. When this happens, I try to close the device, dispose of the UsbManager and then later try to create a new UsbManager and reconnect but it fails when I call UsbDevice.Open. Completely exiting and restarting the program restores communication.

New Post: Unplugged device

$
0
0
I've moved on to other things and haven't worked with this project in a while. Maybe I'm stating the obvious, but it sounds like Dispose() is failing to free some resource. Let me know if you figure out what it is...
Viewing all 20 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>