honeywell-config/README.md
s3lph 4d9be10dd9
All checks were successful
/ build_debian (push) Successful in 19s
feat: add -c, -V, add manpage
2024-11-30 21:39:50 +01:00

5.3 KiB

Honeywell Barcode Reader Config Tool

What?

A Linux tool for configuring Honeywell barcode scanners via USB.

Why?

I had obtained a used Honeywell Hyperion 1300G scanner, however it was locked down and secured with a password, and the password was unknown.

There is a Windows-only configuration tool from Honeywell called "EZconfig" with which the barcode scanners can be configured via USB, even when locked down.

To not rely on a Windows VM for configuring the scanner, I sniffed the USB traffic using Wireshark and extracted the relevant messages, and wrapped them in this tool.

Usage

First of all, compile the program using make. It depends only on libusb-1.0.

The configuration commands can be provided either as CLI arguments or via stdin; if CLI commands are present, stdin is ignrored.

honeywell-config [-v vendor] [-p product] [-1] [-c] [-r] [-d] [-i infile] [-o outfile] [command1 [... commandN]]
  -v vendor     USB vendor ID of the barcode scanner
  -p product    USB product ID of the barcode scanner
  -1            Print response on one line, rather than one token per line
  -c            Print only received commands that contain an argument.  Useful for config backups.
  -r            Reset device after configuration
  -d            Debug mode (more verbose output)
  -i infile     Read input from infile instead of stdin
  -o outfile    Write output to outfile instead of stdout
  -h            Show this help
  -V            Show the version number

If no vendor ID or product ID is provided, the following set of IDs is tried:

  • 0c2e:0b01 (Honeywell 1300G, USB Kkeyboard mode PC)
  • 0c2e:0b02 (Honeywell 1300G, USB Keyboard Apple)
  • 0c2e:0b07 (Honeywell 1300G, USB HID POS mode)

USB serial mode (0c2e:0b0a) is skipped because USB configuration does not seem to work for it (and it isn't found by EZconfig either).

For the actual configuration commands, please refer to your scanner's manual. Here are some examples.

Dump & Restore Config

When invoked without any command or input file, the command ?. is run, which asks the barcode scanner for all known config commands and their current value. Please not that this dump can not be restored as-is - it contains some commands that are not really config options, among them the factor reset commands DEFOVR. and DEFALT. To only retrieve the config commands that have a value associated with them, use the -c flag. You can additionally write the configuration to a textfile using -o:

$ honeywell-config -c -o scanner.conf

This configuration can be restored the the scanner by providing it as an input file using -i. Each sent config command should be acknowledged

  • 0c2e:0b01 (Honeywell 1300G, USB Kkeyboard mode PC)
  • 0c2e:0b02 (Honeywell 1300G, USB Keyboard Apple)
  • 0c2e:0b07 (Honeywell 1300G, USB HID POS mode)

USB serial mode (0c2e:0b0a) is skipped because USB configuration does not seem to work for it (and it isn't found by EZconfig either). by the scanner and printed to stdout:

$ honeywell-config -i scanner.conf
BEPFQ12550.
BEPFQ2100.
...
AXXMOD0.

Retrieve Firmware Version and Build Date

$ honeywell-config REVINF
REVINFProduct Name: Hyperion-1300
Boot Revision: BE000038BAD
Software Part Number: BE000186BAA
Software Revision: 13718|/tags/BE000186BAA
Serial Number: 14143B0807
Supported IF: Standard
PCB Assembly ID: 0
.

Factory Reset

$ honeywell-config DEFOVR DEFALT
DEFOVR.
DEFALT.

Switch Operation Mode ("Plug-and-Play Mode")

USBHID:

$ honeywell-config PAP131
PAP131.

Keyboard (PC):

$ honeywell-config PAP124
PAP124.

Keyboard (Apple):

$ honeywell-config PAP125
PAP124.

The following caveats exist:

  • When switching modes, the scanner restarts on its own, so some error messages are to be expected.
  • When switching to serial console mode (PAP130), this tool can no longer configure it via USB (and neither can EZConfig).

Add Prefix to Output

The following adds the string FCKAFD (ASCII hex 46 43 4B 41 46 44 20) in front of every scanned barcode:

$ honeywell-config PREBK29946434B41464420
PREBK29946434B41464420.

Note how this behaves differently from if you were to configure the scanner in-band via scanning config barcodes. There you would scan a lot of individual codes from the manual:

  1. PREBK2. (command)
  2. K9K. (argument "99" = all code types)
  3. K9K.
  4. K4K. (ASCII hex 46)
  5. K6K.
  6. ...
  7. K2K. (ASCII hex 20)
  8. K0K.
  9. MNUSAV. (finish and save)

On the USB config interface, all of that goes into a single string instead.

Query Current Beeper Settings

$ honeywell-config 'BEP?'
BEPFQ12550,FQ2100,RPT1,ERR1,BEP1,BIP0,LVL0,EXZ,GRX,EXE,DFT,LED1.

List all Settings and Their Possible Values

$ honeywell-config '*'
BEPFQ1100-5000.
BEPFQ2100-5000.
...
AXXMOD0|1|2|3|4|5|6|7|8|9|10.

USB Device Access

Please note that this tool normally needs to run as root. Alternatively, you can set up a udev rule to grant access to the USB device to non-root users.

An example for this can be found in the file 99-honeywell.rules. Put this file into /etc/udev/rules.d, and run sudo udevadm control --reload to load the new ruleset.

Once you replug the scanner, you should have access to it as a regular user.

License

MIT License