Page 46
USB Interface
USB Interface
Code Programming ON
Code Programming OFF
Tools
HID-POS
Access the Device in Your Program
CreateFile opens the device as a HID, then ReadFile delivers the scanned data
to the application. Use WriteFile to send data to the device.
For complete information on USB and HID interfaces, please see www.USB.
com
.
Getting Scanned Data
After scanning and decoding a bar code, the device sends the following input report:
Bit
Byte
7
6
5
4
3
2
1
0
0
Report ID = 0x02
1
Length of the bar code (field "Decoded Data")
2-57
Decoded Data (1-56)
58-61
Reserved (1-4)
62
Symbology Identifier or N/C
:
0x00
63
7
6
5
4
3
2
1
Decode
Data
Continued
VID and PID Table
USB uses two numbers to identify a device and find the correct drivers. The first is the VID (Vendor ID),
assigned by the USB Implementers Forum. The vendor ID (VID) is 1EAB (hex). The second is the
PID (Product ID). A range of PIDs is used for each product sub family, so each PID contains a base
number and an interface type (keyboard, COM port, etc.).
Device
Interface Type
PID(Hex)
PID(Dec)
EM2027
Base
0200
512
HID POS
0210
528
2DScan
Base
0100
256
HID POS
0110
272