System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use barcode reader in HP workstation (C37000 HP11.11)

Lester_wu
Visitor

How to use barcode reader in HP workstation (C37000 HP11.11)

Recently, I try to install a barcode reader onto HP workstation. The barcode reader is port RS-232.

I want to enter string into textEditor, terminal or any software by barcode reader instead of keyboard.

I want to know how to hatch data from RS-232 port when I use barcode reader to scan barcode.

Should I need to write a program to hatch data or is there built-in program can do that?

Does anybody have this kind of experiences about this? Please tell me where can I start.

It would be very grateful for any help!

1 REPLY
Bill Hassell
Honored Contributor

Re: How to use barcode reader in HP workstation (C37000 HP11.11)

Barcode readers range from very dumb (one or two barcode formats, almost no programmability) to typical ones today which have a programming manual where you scan the various settings such as string terminators such as CR or LF or CR+LF, allowed codes like 39, 128, UPC, EAN and in some readers, scanning options to improve readability. Hopefully your reader is fairly sophisticated (and you have the programming manual).

There is nothing for HP-UX that is specific for barcodes, indeed, the task is much more than reading the codes into a file. That can be done with the cp command. The real programming will require some human factors engineering. The first is to specify a destination file. Then the program starts reading and copying each input line to the output file. Now it gets tricky. You need to see each code as you scan, then figure out a way to handle double scans (pressing the trigger twice accidently). And then a way to terminate the program, ideally by scanning a printed code that the program recognizes. If the order of the barcodes is critical, there must be a way to insert a missing scan. Otherwise, the entire set of codes would have to be carefully scanned again.

Then there is the usefulness of a bunch of codes. If you are scannng serial numbers, you'll likely need a second column to associate the barcode with the product, perhaps by scanning the model, then the serial number. As you might expect, you will have to scan carefully to get the two strings in the right order.

As you can see, there is a lot more behind the scenes to validate the codes and allow for unexpected scans. I used a USB barcode reader on a PC and read in several hundred disk drives using Excel. There were a lot of adjustments during the hours of scanning to prevent duplicates and add missing scans. 

The good news is that all of the scanned codes were error free (compared to manually typing the numbers).
The bad news was that the labor was underestimated.



Bill Hassell, sysadmin