Search code examples
encodingbarcodebarcode-scannerimage-scannerquickcontactbadge

Is barcode Code39 scanning reliable?


Within my iOS App I am using a 3rd party scanning library for scanning Code39 barcodes. This software sometimes gets the scan wrong (e.g. a value of "13415566" comes back as "U *"). Sometimes the same barcode works ok, then scan the same code again and it is wrong.

The 3rd party software vendor reports that Code39 isn't a 'reliable' format, and that 'it has no error protection and it is often possible to get false reads'.

This seems ridiculous to me. The codes in question have no check-digit, but even so, surely this is simply a bug in the scanning software? Is Code39 known for this sort of thing? How can it possibly be an adopted format if it 'gets it wrong' sometimes!

Thanks.


Solution

  • There should be no major issues with Code 39 readability. When used in applications where reliable scanning is important Code 39 is normally deployed with protection against misreads in the form a modulo 43 check digit that the scanner is configured to verify prior to passing the code on to the system. Any half-decent barcode generator or barcode reader will support Code 39 check digits.

    As I haven't seen the print quality of the Code 39 barcodes that your are scanning it is impossible to be certain however I would certainly suggest that you are using reader software that has very poor quality Code 39 scanning.

    Your barcode library is probably confused for the following reason, but it is impossible to be sure without extensive debugging of the device...

    Below I have aligned two Code 39 images that were created using the online barcode generator based on Barcode Writer in Pure PostScript. On top is a horizontally flipped image containing "U" and beneath is an image containing "13415566".

    Two code 39 barcodes aligned

    Reading the top image from right-to-left you can see that there is a degree of similarity with some portion of the bottom image.

    A scanner might be forgiven for the misread of this unprotected Code 39 except that it has following against it:

    • It should be expecting a quite zone (whitespace) before the leading start bars sequence.
    • It should be expecting a quite zone after the trailing stop bars sequence.
    • The bar pattern for "U" is not entirely correct.
    • The assumed stop bar sequence is not entirely correct.