Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Bug with Barcode Scanner
Started by kakula Nov 07 2019 07:26 AM

5 replies to this topic
bug barcode scanner
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

kakula

[GLOBAL: userInfoPane.html]
kakula
  • Contributor

  • 106 posts
  • Corona SDK

Hi,

 

I have a problem with QR Scanner Plugin

 

The Problem is, when you scan a barcode, you don't always get the same value

 

first i thought this is because i'm using too many barcode types, which gave so many errors

 

but right now i'm only using ean13 barcode type

 

and i'm reading the same barcode whether from a webpage or from a plain paper

 

and sometimes it gives a wrong value

 

This is function i'm using:

local function listener3(event)
  print(event.message)
end
local function barImg_Tap()
  qrscanner.show{
      topbar = {
        text = 'Barcode Scanner',
      },

      symbols = {'ean13'},
      overlays = {
        searching = {
          filename = 'images/home/searching.png',
          baseDir = system.ResourceDirectory
        },
        found = {
          filename = 'images/home/found.png',
          baseDir = system.ResourceDirectory
        }
      },
      listener = listener3
    }
end
barImg_Tap()

you can test it yourself

 

just go to https://barcode.tec-it.com/en/EAN13?data=6251158770107

 

and scan the barcode many times and see for yourself

 

 

Attached Files



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,861 posts
  • Corona SDK

Is the checksum valid for the misreads?



[TOPIC: post.html]
#3

kakula

[GLOBAL: userInfoPane.html]
kakula
  • Contributor

  • 106 posts
  • Corona SDK

i used the same website to generate the mis-read barcodes and they are correct

 

this website will not generate the barcode if it is written in a wrong way (bad checksum)

 

https://barcode.tec-it.com/en/EAN13?data=0081121000087

 

https://barcode.tec-it.com/en/EAN13?data=0065363000067

 

 

 

This one for example is a wrong barcode (manually created):

 

https://barcode.tec-it.com/en/EAN13?data=0065363000064



[TOPIC: post.html]
#4

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,861 posts
  • Corona SDK

How often are the reads coming in via the listener? Just wondering if you could keep track of reported codes, and when you have maybe 4 or 5 choose the one that occurs most often. 



[TOPIC: post.html]
#5

kakula

[GLOBAL: userInfoPane.html]
kakula
  • Contributor

  • 106 posts
  • Corona SDK

i'm not sure i understand your question, but in general my app is used to scan barcodes of medicine boxes, so users click a button to scan the barcode... most of the times it is correct ... but sometimes it is totally wrong

so as a test we scanned the same box for many times ... and you can say there is a 30% chance to get the barcode wrong ... and this happens for any barcode even if it looked crystal clear and large enough in size

 

i'm not sure why hardware barcode scanners never make mistakes ... they either read or not

 

i thought barcode detection through software would be the same... but seems not!

i read an article about this and i can see why this might happen ... but not sure why it does not happen with hardware scanners

 

i noticed that most bad readings has 3 or 4 zeros inside the barcode ... so i will do further tests and check if this is real ... i will let the software scan again if the 3 zeros occur .... but i hope that real time universal barcodes do not have 3 or 4 adjacent zeros



[TOPIC: post.html]
#6

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,861 posts
  • Corona SDK

I don't know how the plugin behaves,so I was asking if you just get one barcode in the listener or a constant stream until you dismiss it? If you get a series of readings for the same barcode then you can ignore those that don't match the ones around them.

In Xamarin I use the Zxing scanner library for a POS app and haven't noticed any false readings so far.


[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: bug, barcode, scanner