Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read data from Honeywell Scanner #288

Closed
2 of 3 tasks
tresf opened this issue Mar 22, 2018 · 3 comments
Closed
2 of 3 tasks

Can't read data from Honeywell Scanner #288

tresf opened this issue Mar 22, 2018 · 3 comments
Milestone

Comments

@tresf
Copy link
Contributor

tresf commented Mar 22, 2018

Edit: The solution is to provide a usagePage parameter. This is an API change... (2.0.6 and greater only)

var device = {
   vendorId: '0x0c2e',
   productId: '0x0b87',
   usagePage: '0x008c', //filter out 0xff8c
   readSize: 61,
   interval: 10, //ms

Before

qz.hid.claimDevice(device.vendorId, device.productId);

After

qz.hid.claimDevice(device);

We found a problem while working on #286 with the way Honeywell scanners work with QZ Tray...

  • Honeywell installs two USB devices with the same VID / PID.
  • QZ Tray grabs the first device with may NOT be the HID device.
  • QZ Tray can never read data from the Honeywell barcode scanner.

A second feature will be added which allows querying on UsagePage parameter from the Honeywell scanner.

  • -116 Incorrect USB device
  • 140 The HID device, the one we want

Tested on:

  • Windows - Works using PureJavaHIDAPI
  • MacOS - Works using HID4Java
  • Linux - Broken
@tresf
Copy link
Contributor Author

tresf commented Mar 24, 2018

We've decided to use usagePage for identifying the endpoint of the scanner, but there is a slight disparity on Mac...

  • 4294967180 Incorrect USB device ⚠️
  • 140 The HID device, the one we want

HID4Java appears to be returning a Long instead of an Integer. We could add long support to the library but the disparity could cause differences between API calls on Mac and Windows which is never desired. This seems like it may be a bug with the way HID4Java returns the usagePage.

Edit: Another option is to use a bitwise mask to see if the usagePage matches.

@tresf
Copy link
Contributor Author

tresf commented Mar 26, 2018

Turns out casting 4294967180 to short will make it -116. Implemented via 8eda5b5.

@tresf
Copy link
Contributor Author

tresf commented Mar 27, 2018

Closed via #289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant