How to read from physical barcode scanner
Hi All,
Someone asked me to help with an application that uses a barcode reader to get a PDF417 barcode and decode it (the original information is zipped and encoded before being made a barcode).
But I ran into difficulties:
- the dll's that I found are starting from files on disk; I need to work with data from a laser scanner
- scanning into a file and processing it seems not to be an option; the way I understand, scanners are treated like keyboards, and what comes is like keystrokes. As my barcode is binary data, I'm losing some information in the process, making the decoding impossible
Is it possible to scan into a memory buffer, and do the reading of that buffer instead of a disk file? Or, maybe another approach?
One more think: if possible, can I get an urgent answer? I know it's not very polite, but I'm under hammer and hard place right now...
Thanks,
SxN
Re: How to read from physical barcode scanner
Of course, is between a hammer and a hard place, sorry for that
SxN
Re: How to read from physical barcode scanner
Does the model of scanner have an sdk available for you to use? Often the scanner barcode manufacturers will make the sdk available.
Re: How to read from physical barcode scanner
Well, I don't know. The device is in Europe, I'm in Canada, and between my timezone and the person's I'm helping are 7 hours.
I'll talk to him tonight (about 10:30 EDT), but until then do you have any pointers?
Thanks,
SxN
Re: How to read from physical barcode scanner
Not really, you pretty much need the hardware mfg to supply the means to interact with their product.
Re: How to read from physical barcode scanner
Most of the time barcode reader behaves like keyboards, no ?
Re: How to read from physical barcode scanner
> Most of the time barcode reader behaves like keyboards, no ?
Correct, and that's part of the problem. In my case, it is about reading and encoded and compressed piece of information, in other words it is binary rather than alphanum. I tried to treat the input as a Console input, and lost some of the bytes.
I have to find a way generic enough to work with any barcode scanner; a particular SDK from a particular vendor won't help.
Right now I'm exploring Florian Reitner's USBHIDDRIVER
(http://www.florian-leitner.de/index....river-library/)
SxN
Re: How to read from physical barcode scanner
Enschuldigung, es ist Leitner, nicht Reitner...
(sorry, it's Leitner, not Reitner)
I need a sleep :-(
SxN
Re: How to read from physical barcode scanner
I have no experience of reading barcode by physical scanner, but i am using the barcode reader for .net.
Integrating .NET Barcode Reader into your .NET project, you can easily embed barcode reading functionality to your ASP.NET websites, .NET Windows applications, and .NET Web services.
Both C# and VB.NET are supported.
Hope it helps!
Re: How to read from physical barcode scanner
I know this is an old thread but since it was revived I thought I would chime in as it may help someone. Barcode scanners usually act as either a keyboard wedge or as an RS232 device and some have the option to work as either.
When using it as a RS232 device then you just need to read the binary data from the serial port buffer as it arrives.
Keyboard wedge type is a bit more hit an miss unless hook into the API to capture keystrokes. This is the only way I know of to get them if for some reason your app loses focus.
I have had success though by trapping the KeyCode in either the KeyDown or KeyUp event within my apps provided of course they have focus at the time.
For PDF417 barcodes I would highly recommend the RS232 interface be used. If the scanner in question does not support RS232 or BlueTooth or some other method that will allow you to read it as a serial port or IP address then I would seriously think about buying a different scanner.
Re: How to read from physical barcode scanner
Quote:
Originally Posted by
donnygross
Recently, I think the phone barcode reader or the physical barcode reader is somewhat not so convenient. So I am trying to develop a barcode reader plugin for Brower, something like Firebug, so users can scan the
barcode image without taking it to sever or using another barcode reader.
What?
To scan a barcode you need a scanner, or a picture of the barcode. Nothing has to go to a server so no idea what you are talking about and no idea why you added it to this thread which is about reading a PDF417 barcode with a physical scanner.
Re: How to read from physical barcode scanner
Yes, Just need a barcode reader. If you want to read barcode in .NET, you can use a .NET barcode reader SDK. If you want to read barcode in Java, you can use a Java barcode reader SDK, etc.
Re: How to read from physical barcode scanner
You do not need any SDKs to get the data from a physical barcode reader. It is simply delivered as either Keystrokes or Serial Stream data depending on the reader in question.
Mobile devices are a different case where some do provide an SDK for talking to the barcode reader but they typically also offer a wedge program that will allow you to read barcodes without using thier SDK as part of your program.
Reading barcodes from pictures is another matter but it should also be known that many things you see on the net for working with barcodes of for 1d barcodes and will not work with PDF417 which is a 2d barcode which can contain lots of data.
Re: How to read from physical barcode scanner
Quote:
Originally Posted by
SxN02
> Most of the time barcode reader behaves like keyboards, no ?
Correct, and that's part of the problem. In my case, it is about reading and encoded and compressed piece of information, in other words it is binary rather than alphanum. I tried to treat the input as a Console input, and lost some of the bytes.
I have to find a way generic enough to work with any
barcode scanner; a particular SDK from a particular vendor won't help.
Right now I'm exploring Florian Reitner's USBHIDDRIVER
(
http://www.florian-leitner.de/index....river-library/)
SxN
Does this barcode scanner sdk help to read truncated PDF417 barcode?
Re: How to read from physical barcode scanner
use a professional and mature barcode scanner in .net development to help you scan and read different barcodes.
Re: How to read from physical barcode scanner
Quote:
Originally Posted by
imageat
What does that even mean?
You don't need anything special to process a barcode. The reader/scanner is a piece of hardware. These will send the data to the PC either as RS232 or Keyboard input. You simply use a serial port to receive the data if it is RS232 and if keyboard data it will fire the keypress routines just like it was typed from a keyboard.
There is no need for any SDK. I have no idea why people keep thinking otherwise.
I've been processing barcodes for over 15 years now with just a few lines of simple code.
Creating barcodes on the other hand may require an SDK or something similar. Depending on the type of barcode in question.
As for binary data there you may need a reader/scanner that does not use keyboard input but an RS232 input which can handle binary inputs, also means that the scanner in question has to be able to read this type of barcode, PDF417 for example.