I received a CN3 today to try out with our snapRetail applications and at first it seemed like things weren’t working correctly with scanning, but it soon became apparent that it was just a matter of scanner configuration.
The first problem I had was ironically the problem of scanning ocurring when I it should be disabled. By default Intermec has enabled a keyboard wedge, “Virtual Wedge”, that accepts barcode data from the scanner and generates key events to simulate that the data has come from the keybooard. This is easy enough to disable, just go in to Intermec Settings (Settings->System->Intermec Settings) and disabled the Virtual Wedge and after copying the Intermec Data Collection dll over to my program the terminal scanned only when I wanted.
While I guess it’s ok to enable this by default, though it has always been a pet peeve of mine to call applications barcode enabled, when all they are doing is using a keyboard wedge. While this “works”, it creates an incredibly clumsy interface for barcode scanning that keeps the scanner always enabled, and puts barcode data anywhere the keyboard focus is set. This may be “ok” for consumer devices, so I can put barcode data in my Word document, but for “real” applications it is really a bad idea.
What bothers me even more is when people claim that they have a barcode-enabled handheld program, when all they’ve done is turn the keyboard wedge on. Perhaps the worst case of this “mis-advertising” I’ve seen was during the keynote of the 2006 Microsoft Embedded Developers Convention where they demonstrated creating a “barcode enabled application” to a roomful of developers when all they had done was use a keyboard wedge. Perhaps if they would have attended my session they would have been able to do it the real way ;-).
Automatic Symbology Conversion
Once I got back to being able to control the scanner, and configure the Symbologies, I went in to the Item Lookup application to try scanning some barcodes. Everything seemed to be scanning fine, except that whenever I scanned a UPC code I was receiving thirteen digits (with a leading zero) instead of twelve as I was expecting from a UPC barcode.
This gets in to the whole world of automatic barcode conversions. In order to support the requirements of different industries and governments there are a broad variety of similar, but slightly different symbologies. This means that for a US-based retail , the developer must take in to consideration EAN8, EAN13, UPCA, UPCE0, and UPCE1 barcode symbologies. In addition, there are also UPC Supplemental barcodes (extra information often used on books for ISBN numbers), check digits, and expansion of EAN8 barcodes to EAN13.
In this case, the default configuration that Intermec has selected is to convert everything to an EAN13 symbology which in my case caused the problem. This is also configurable through the Intermec Settings application, and disabling the conversion “UPC A xmit as EAN 13” solved my problem. Alternately, this can be configured programmatically through the Intermec Data Collection API but I like keeping these types of paramaters configurable by the end user.
However, the lesson is that even if the hardware vendors decide to make it easy for the application developer to use barcodes, its still important for them to understand what “magic” is happening under the covers.