163 lines
5.1 KiB
Markdown
163 lines
5.1 KiB
Markdown
# Honeywell Barcode Reader Config Tool
|
|
|
|
## What?
|
|
|
|
A Linux tool for configuring Honeywell barcode scanners via USB.
|
|
|
|
## Why?
|
|
|
|
I had obtained a used Honeywell barcode 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 to configure.
|
|
-p product USB product ID of the barcode scanner to configure.
|
|
-s serial USB serial number of the barcode scanner to configure.
|
|
-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). Can be provided repeatedly to increase verbosity.
|
|
-i infile Read input from infile instead of stdin.
|
|
-o outfile Write output to outfile instead of stdout.
|
|
-h Show this help and exit.
|
|
-V Show the version number and exit.
|
|
```
|
|
|
|
All USB devices on the host are iterated, and the first one with an EZConfig configuration endpoint is chosen.
|
|
If there are multiple compatible devices on the host, you can control which device is selected by providing a vendor ID, product ID or serial number.
|
|
|
|
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`:
|
|
|
|
```shell-session
|
|
$ 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 by the scanner and printed to stdout:
|
|
|
|
```shell-session
|
|
$ honeywell-config -i scanner.conf
|
|
BEPFQ12550.
|
|
BEPFQ2100.
|
|
...
|
|
AXXMOD0.
|
|
```
|
|
|
|
### Retrieve Firmware Version and Build Date
|
|
|
|
```shell-session
|
|
$ 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
|
|
|
|
```shell-session
|
|
$ honeywell-config DEFOVR DEFALT
|
|
DEFOVR.
|
|
DEFALT.
|
|
```
|
|
|
|
### Switch Operation Mode ("Plug-and-Play Mode")
|
|
|
|
USBHID:
|
|
|
|
```shell-session
|
|
$ honeywell-config PAP131
|
|
PAP131.
|
|
```
|
|
|
|
Keyboard (PC):
|
|
|
|
```shell-session
|
|
$ honeywell-config PAP124
|
|
PAP124.
|
|
```
|
|
|
|
Keyboard (Apple):
|
|
|
|
```shell-session
|
|
$ 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:
|
|
|
|
```shell-session
|
|
$ 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)
|
|
1. `K9K.` (argument "99" = all code types)
|
|
1. `K9K.`
|
|
1. `K4K.` (ASCII hex 46)
|
|
1. `K6K.`
|
|
1. ...
|
|
1. `K2K.` (ASCII hex 20)
|
|
1. `K0K.`
|
|
1. `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
|