I have a Honeywell Voyagar 1202g barcode scanner that I managed to get working with Mac and Windows.
First you will need to change the barcode scanners interface to CDC-ACM, either by using EZConfig (Honeywell software) or by scanning a barcode that you can find on their website.
Steps to get it working on Windows:
- Install Zadig
- Install HSM USB Serial Driver Package
- Find your device in Windows settings and update USB Composite Device driver (Let me pick from a list of drivers, uncheck compitable drivers) to use Honeywell->WinFlash Intermec Device (without this step Zadig could not find the correct interface).
- Using Zadig you should now see your device, update driver to libusbk
- Restart PC (important)
Code:
const decoder = new TextDecoder();
const startDevice = async () => {
try {
// you should be able to discover your PRODUCT_ID and VENDOR_ID from
// chrome://device-log
const device = await navigator.usb.requestDevice({
filters: {
productId: PRODUCT_ID,
vendorId: VENDOR_ID
}
});
// log device data to see available configurations and interfaces
await device.open();
// only 1 configuration was available for me
await device.selectConfiguration(1);
// interface 1 was bulk transfer
await device.claimInterface(1);
readLoop(device);
} catch (error) {
console.error(error);
}
}
const readLoop = async (device) => {
try {
const result = await device.transferIn(1, 64);
// this is your incoming data
const data = decoder.decode(result.data).trim();
readLoop(device);
} catch (error) {
console.error(error);
}
}