Home > Uncategorized > Data Matrix 2-D barcode with Underscore and TAB

Data Matrix 2-D barcode with Underscore and TAB

DataMatrix

Our corporate overlords have decided an underscore as the ideal separation character between our first and last name within our usernames for Oracle E-Business Application. And we have some pretty horrendous password requirements (Contains a capital letter, number, 8+ characters long). If you have used a handheld scanner like the Intermec CK71 before, you know how much of a pain it is to type in text, especially text with an underscore or capital letters.

I got pretty sick of signing into the handheld scanners, so I decided to make a barcode to log me in. None of the 1-D barcodes would work since they are either not dense enough, or are not compatible with special characters/keystrokes like the underscore or TAB.

Our scanners are pretty high tech and have a 2-D imager on them, so Data Matrix or QR (Quick Response) codes were acceptable alternatives. I chose Data Matrix as QR was not enabled by default, where Data Matrix was.

It was much more difficult to encode the 2-D barcode than a 1-D Code 3 of 9 barcode; here is how I did it.

Full Label ZPL

^XA
^FO100,100
^BXN,10,200
^FH_^FDED_5FHAYES_09Oracle123^FS
^XZ

Data Matrix Barcode

^BXN,10,200

Field Hexadecimal Indicator = _

^FH_

Hexadecimal for Underscore (_)

_5F

Hexadecimal for a TAB

_09

It is important to use the Field Separator (^FS) at the end of the encoded text to prevent your application from putting in a line feed or carriage return into the encoded text, which would then be sent to the printer. That line feed or carriage return would manifest itself as an unprintable character that would make your login sequence not function correctly.

When the scanner reads the text and puts int into the Telnet application for the username, it will seem like it puts the password into the field, but after the scanner reads the text a second time, it will correctly pass the password into the password field. Our scanner is set to send an enter command after a successful scan, so all it takes is the scan of one barcode to log into Oracle. What a huge improvement!

Happy Barcodeing!

  1. April 15, 2016 at 10:05 AM

    Another example that separates alpha characters and hex characters for a longer string:
    ^XA
    ^FO100,10
    ^FO20,20^A0N,40, 40^FDTEST
    ^FS
    ^FO100,100
    ^BQN,2,6
    ^FH_^FDMM,AERH,B0001_09,A1,B0001_0D,A23
    ^FS
    ^XZ

    Note: the comma (,) that separates the segments, and the A or B that designates the Alpha or Byte srings

    This should produce a scan of
    ERH[TAB]1[ENTER]23

  1. No trackbacks yet.

Leave a comment