HID USB Driver / Library. Table of Contents– Motivation– The Human Interface Device Class– USB Specific Stuff– The HID USB Device Interface– How to Integrate the Library into a Visual Studio Project– How the HID USB Library works internal– Where can I get the HID USB Library. Motivation. We wanted to find a new solution to connect our Hardware to the PC via USB because the experience we made with FTDI Chips was not satisfying at all. The USB controller of our choice was the Maxim MAX3.
U.are.U 4500 Fingerprint Reader- the ultimate fingerprint identity machine with elegant sleek design. Contact Idency today for more information.
E that is connected to the microcontroller through a Serial Peripheral Interface (SPI). The MAX3. 42. 0E comes without any drivers or libraries you can use to “speak” with it.
Download Windows 7 64-bit Driver Absolutely Free! Drivers For Free software scans your computer for missing and outdated drivers. With free account activation and. Search metadata Search full text of books Search TV captions Search archived web sites Advanced Search. You've reached the right place. We have every kind of drivers you'll ever need. Here you'll find free access to the drivers you need. Just do a search using one of.
![Digital Persona Fingerprint Reader Driver 4500 Digital Persona Fingerprint Reader Driver 4500](https://ae01.alicdn.com/kf/HTB1TA6bNpXXXXbIXFXXq6xXFXXXu/U-are-U-4000B-Free-Shipping-USB-Biometric-font-b-Fingerprint-b-font-Reader-Biometric-Digital.jpg)
This is the reason why I had to develop my own “driver”. After a day of reading and googling I decided that the best an easiest way is to use the Human Interface Device Class (HID).
The HID- Class is a generic device class which means that all devices in this class are supported by Microsoft Windows and there are already existing DLLs with functions that we can use. The start point for the “driver” was an article I found in the Microsoft developer network: „Is That You? Writing Better Software for Cool USB Hardware” written by Scott Hanselman.
Scott’s software is based on the USBSharp Class. Luckily the MAX3. E comes with a code sample that configures the controller as a Human Interface Device so we didn’t have much trouble to find out how to configure it as HID.
The Human Interface Device Class. As mentioned above the HID Class is a generic device class so the driver is integrated in the operating system which makes things easy. If a new HID device is plugged in there is no need of any driver installation. The functions to access and control a HID device are included in the Windows hid. System. 32 folder. If you do not know for sure if your device is a HID device you should have a look at this little application. It is a part of windows and you can run it with the start - > run “msinfo.
Or under Windows Vista just press the Windows- Key Type msinfo. USB Specific Stuff. Identify your USB device. USB device are identified by their vendor and product id.
Those IDs are consisting of a prefix (“vid_” for vendor id or “pid_” for product id) and a 4 digit HEX number. The MAX3. 42. 0E for example has the vendor id vid_0.
Usually both values can be changed in the source code of the USB device (assumes that you have access to that code). Package Size / Communication Speed. HID devices are communicating with the pc through so called hid reports. Those reports consist of 6. Each microsecond one report is send from pc to the USB device and vice versa. This means that theoretical a transfer rate of 6. Kbytes per second can be achieved.
The HID USB Driver Interface. The driver is written in C# and designed as a DLL, this has the benefit so it is very easy to integrate the drive into a new project. Just import the DLL or the project and you are finished.
I tried to keep the interface as simple as possible on the one hand and on the other hand to integrate as much functionality as possible. At the moment it has the following functions: USBInterface(String,String) constructor. This method initializes a new instance of the USBInterface class. Parametersvid. The vendor id of the USB device (e. The product id of the USB device (e. USBInterface(String) constructor.
This method initializes a new instance of the USBInterface class. Parametersvid. The vendor id of the USB device (e. Connect() method. This method establishes a connection to the USB device. You can only establish a connection to a device if you have used the construct with vendor AND product id.
Otherwise it will connect to a device which has the same vendor id is specified, this means if more than one device with these vendor id is plugged in, you can’t be determine to which one you will connect. Returns. False if any error occurs. Disconnect() method.
Disconnects the deviceget. Device. List() method.
Returns a list of devices with the vendor id (or vendor and product id) specified in the constructor. This function is needed if you want to know how many (and which) devices with the specified vendor id are plugged in. Returns. String list with device pathswrite(Byte[]) method. This method writes the specified bytes to the USB device. If the array length exceeds 6. The 0- 6. 3 byte of the array is sent first, then the 6.
Parametersbytes. The bytes to send. Returns. Returns true if all bytes have been written successfullystart. Read() method. This method is used to activate the “reading- State”. If you execute this command a thread is started which listens to the USB device and waits for data.
Read() method. This method switches from “reading- State” into “idle- State”. By executing this command the read data thread is stopped and now data will be received. Usb. Buffer. Event(Event.
Handler) method. By calling this method with an event handler (System. Event. Handler) the add- event listener of the USB Buffer is enabled. Thus whenever a dataset is added to the buffer (and so received from the USB device) the event handler method will be called. Parameterse. Handler. The event handler (System. Event. Handler) method. How to integrate the HID USB Library into a Visual Basic Project.
There a two ways to integrate the HID USB Library into a Visual Studio project. One is to add the library project to your Visual Studio solution. The other way is to add a reference to the USBHIDDRIVER. Add the library project to a Visual Studio 2. Open your Visual Studio solution.
Go to “File > Add > Existing Project”2. The following Dialog will open. Navigate to the USBHIDDRIVER. Right click on your Visual Studio project and click « Add Reference »4.
Select the „Projects“- tab. Then select the USBHIDDRIVER and click ok. Add the USBHIDDRIVER. Visual Studio project.
Right click on your Visual Studio project and click « Add Reference »2. Select the „Browse”- tab. Then navigate to the USBHIDDRIVER. Use the USBHIDDRIVER.
Visual Basic 6. The . Net runtime allows unmanaged COM aware clients (like Visual Basic 6 applications) to access . Net components through the COM interop and through the tools provided by the framework.
The USBHIDDRIVER. NET assembly which can not be accessed by Visual Basic 6.
Therefore we have to create a type library which can be used with Visual Basic 6. This can be done with the Tool Reg. Asm. exe that you will find in the directory of your . Net framework installation.
Create a . bat file in the directory of the USBHIDDRIVER. Then run the bat file.“C: \WINDOWS\Microsoft. NET\Framework\v. 2. Reg. Asm. exe” USBHIDDRIVER. USBHIDDRIVER. dll.
Now you have to copy both the dll and the tlb file in the same directory as the application which is consuming it. How to use the HID USB Library. Let’s say you want to communicate with an USB device that has the vendor id vid_0. So the first thing you may want to have is a list of all devices connected to the pc which have the specified vendor id. To do this just make a new instance of the USBInterface class with only the vendor id as parameter.
Then call the get. Device. List- Mehtod and you will receive a list of the devices that are connected. USBHIDDRIVER. USBInterface usb = new USBInterface(“vid_0. String[] list = usb.
I. get. Device. List(); For communicating with the device make a new instance of the USBInterface class with the vector id and the product id as parameter. After that, you can call the connect- method and a connection will be established. USBHIDDRIVER. USBInterface usb = new USBInterface(“vid_0b.
Connect(); Once your device is connected you can read or write data. To write data just call the write method with an array of bytes you want to send as parameter. For reading you have to options: first without the USB buffer event and second with USB buffer event. If the event is enabled, the event handler method will be called when a new dataset is received. Otherwise you can process the data with a timer or something like this. Byte); usb. enable.
Usb. Buffer. Event(new System. Event. Handler(my. Event. Cacher)); Thread. Sleep(5); usb. start. Read(); …usb. stop. Read(); usb. write(stop.
Byte)How the HID USB Library works internal. The library is based on the USBSharp class that imports all needed methods from the kernel.
The HIDUSBDevice class wraps those methods and handles the read thread. The USBInterface is the main interface, which is accessible from outside the dll.
In the USBInterface class exists a object of the List. With. Event, which is basically a Array.