Re: Zxing Code 128 not Scanning properly

1,055 views
Skip to first unread message

Sean Owen

unread,
Apr 16, 2013, 9:06:32 AM4/16/13
to zx...@googlegroups.com
This is not nearly enough information. There's no limit. You haven't shown a barcode or defined 'not getting correct string'.

Lachezar Dobrev

unread,
Apr 16, 2013, 10:57:43 AM4/16/13
to Amal Somaweera, zx...@googlegroups.com
What device are you using?
Typical low-end devices have poor focus, which is crucial for
reading the fine lines of a 1D bar-code.

When you have a smaller amount of data to encode a bar-code may end
up with thicker lines, which may contribute to the fact, that you're
successful in reading shorter bar-codes. When the bar-code is larger
the lines become thinner. Occasionally you might end up with a
FALSE-POSITIVE read which will show different text (I get typically
false-positive UPC-E reads). That might account for the occasional
'wrong' read.

Also make sure when you use CODE-128 with digits only to correctly
specify 128-C mode to take advantage of the higher capacity for that
case. Using 128-A or 128-B will result in larger bar-code for the same
content.

We're using extensively Code128 with 20 digits (SSCC) printed on
adhesive labels, and we have serious problems with low-end devices. We
were forced to add a back-up Data-Matrix on the label to alleviate
this issue a bit.

2013/4/16 Amal Somaweera <am...@ceynox.com>:
> I tried to Scan code 128 barcode with character length 22 using Zxing
> Android. it is not scanning sometimes scanning not getting correct string.
> what is the problem zxing with code 128 and character length more than 22?
> (it is working fine for length 18)

Lachezar Dobrev

unread,
Apr 23, 2013, 8:59:06 AM4/23/13
to Amal Somaweera, zxing
I'm not sure about the model (I don't have one), but reading reviews
on the Internet led me to believe, that this device has a fixed-focus
camera, which is really bad news for 1D bar-codes (with ZXing).

I would try the following:
- Generate a bar-code image
- Open it on a computer (with any image viewer)
- Zoom the image as much as possible, but keep the whole visible
- Try to read the bar-code from some distance

If the device can read the code with this 'trick', than I would
blame no auto-focus. If the device fails to read the bar-code with
this trick I would start looking at the screen resolution.

2013/4/23 Amal Somaweera <am...@ceynox.com>:
> HI Lachezar
> I used xperia ST21i android version 4.0.4 RAM 512Mb.

Raica Cristi

unread,
Apr 9, 2014, 10:14:27 AM4/9/14
to zx...@googlegroups.com
On Tuesday, April 16, 2013 3:57:47 PM UTC+3, Amal Somaweera wrote:
> I tried to Scan code 128 barcode with character length 22 using Zxing Android. it is not scanning sometimes scanning not getting correct string. what is the problem zxing with code 128 and character length more than 22?
> (it is working fine for length 18)

I also have this issue, especially with barcodes 128 generated from this website http://www.myassettag.com/Custom-Asset-Tags/Sequential-Barcode/SKU-AT-3082P-B.aspx
Is anyone aware of any kind of solution to this?

Sean Owen

unread,
Apr 9, 2014, 4:30:32 PM4/9/14
to zx...@googlegroups.com
This is a duplicate, right? That barcode doesn't look right. See other discussions here.

Raica Cristi

unread,
Apr 10, 2014, 11:24:31 AM4/10/14
to zx...@googlegroups.com
On Wednesday, April 9, 2014 11:30:32 PM UTC+3, Sean Owen wrote:
> This is a duplicate, right? That barcode doesn't look right. See other discussions here.

Yes, I am sorry for that, I forgot about that post because I wasn't notified by email that it was answered...
Thank you.

Reply all
Reply to author
Forward
0 new messages