FrenkyDema / qrcode_barcode_scanner

Listen barcode input from keyboard device interface
https://pub.dev/packages/qrcode_barcode_scanner
MIT License
6 stars 2 forks source link

[BUG] Can't Handle "_" #31

Closed m-pastuszek closed 7 months ago

m-pastuszek commented 1 year ago

Describe the bug Scanned barcode data is incorrect, due to (I think) shift key issue. My barcode contains underscores _, but are read as -. When I scan 4000_TRA_TRAILER02 it returns 4000-tra-traileR02.

To Reproduce Just scan the barcode code128 4000_TRA_TRAILER02.

Expected behavior Scanned 4000_TRA_TRAILER02 barcode should return the same data.

Smartphone (please complete the following information):

Additional context Same scanned barcode in for example, notes app returns correct data, so I think that it may be an issue with reading keyevents. Tried with two different scanners and both returning incorrect data.

m-pastuszek commented 1 year ago

It's not just the issue with underscore character, but also uppercase letters. As I said, 4000_TRA_TRAILER02 returns 4000-tra-traileR02 string.

FrenkyDema commented 1 year ago

@m-pastuszek I try with this: image

And it work: Screenshot 2023-09-13 alle 08 57 00

m-pastuszek commented 1 year ago

For mine, it don't... Maybe it's related with scanner device. I've tested Zebra DS2278 and Inateck BCST-70.

Screenshot_20230914-134443

If I change transmission speed to 16ms (from default 0ms), it reads correctly, but then it also causes that sometimes it overrides the output partially.

Please see attached video:

https://github.com/FrenkyDema/qrcode_barcode_scanner/assets/32341770/f84f92e4-a144-4241-b7a9-ddd4e64c8fd0

First scan with Zebra - output 4000-tra-traileR02. Second scan with BCST-70 (correct output). Third and next scans also with BCST-70, but output is overrided.

Overriding issue: Maybe some buffer variable would be needed? Wrong output: Looks like that scanner gives too speed events and Android can't read it properly.

FrenkyDema commented 7 months ago

@m-pastuszek I should have solved the problem of scan with the new version, let me know if the problem persists