LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   barcode software for any platform/language (https://www.linuxquestions.org/questions/programming-9/barcode-software-for-any-platform-language-403078/)

nadroj 01-13-2006 05:34 PM

barcode software for any platform/language
 
iv searched briefly on lq.org and afew other places, but couldnt find exactly my result.

if anyone knows of free software/APIs for reading information from a barcode reader to a computer? (any OS, or programming language.. preferably VB.net on windows NT-based system)

Thanks

PerfectReign 01-13-2006 06:32 PM

What's your barcode reader? Are you using a serial interface? If so, the reader should simply send serial signals into the computer, which should be ASCII characters. (I last did this under OS/2 2.1 in the mid-90's so forgive me if I'm outdated.)

Why would you want to use vb.net? At the very least please drop that POS "language" and go with C#. I remember being at TechEd '01 when Mr. Gates introduced VB.NET and I immediately thought it smelled like a dying skunk.

nadroj 01-13-2006 06:37 PM

well i meant VS.net (SOME .net language, preferably vb, since the program im designing is only going to be used once on this specific machine, and vb.net is a (more) simple language so that will ease the process.

i think iv looked at c# once, so i dont want to use it. i know vb.net, java, c++, but would prefer vb.net for this project, so the GUI design is simple and quick

i dont even have a reader yet.. i was hoping to find some software first, then go from there. i wonder if that idea of just reading the serial port is still how it is done? i hope; sounds relatively easy.

if nothing else, i guess i can look for a reader that COMES with some libraries for getting its input.

Thanks for the input

xhi 01-13-2006 06:53 PM

i dont remember them off the top of my head but i know there are several opensource barcode reader projects. maybe you could start by getting some code and figuring out how to port it to .NET (blah) or whatever you decide to use...

try google ?

nadroj 01-13-2006 07:07 PM

ya, i have been looking for a while.

most i can find is barcode printers, fonts, and barcode inputs to images projects/classes.

im gonna wait and try get my hands on one and hope that all i have to do, like PerfectReign had to do in the past, is read the serial port.

ajs318 01-16-2006 09:15 AM

Simple interfacing
 
Almost all the bar code readers I have seen plug into a PC keyboard interface: at the end of the cable from the reader are a socket for the keyboard and a plug to go into the PC. Whenever a bar code is scanned, the reader generates the same output as though the digits of the code were typed on the keyboard. Data from any keys pressed when the reader is not scanning a bar code just passes straight through.

So in Visual BASIC you're probably looking at using the INKEY$ function, which has been around since GW-BASIC .....
Code:

DO
    DO
        $I = INKEY$
    LOOP UNTIL $I > ""
    PRINT $I;
LOOP

There are also a minority of bar code readers that attach to RS232 or USB ports. The former are easy {if you know about working with files and devices} and the latter probably will come with Windows-only drivers if they don't just emulate e.g. a keyboard or RS232 interface. They have the "advantage" that it might be possible to tell what came from the reader and what came from the keyboard {though maybe not if the USB ones just emulate a USB keyboard}.

I worked at a place where they wanted to have a PC with a keyboard-inline bar code reader and not be able to "spoof" the bar codes by typing on the keyboard. {mathematical impossibility alert!} They ended up putting extra non-printing control characters fore and aft, but as I recall it was still very easy to defeat ..... fortunately, it relied on the stupidity of the users, which in general is unlimited.

Wim Sturkenboom 01-16-2006 09:29 AM

Both systems exist, serial and keyboard style readers. As said, the output is usually the same as from a keyboard.

It's important to know about barcodes and the readers. There are several 'codes' and there are several specifications for spacing versus height.

Buy the wrong reader and you might not be able to read the barcode because it does not understand the code and/or because the resolution is not heigh enough.

ajs318 01-16-2006 10:59 AM

The readers made by Welch Allyn and sold by Farnell or RS seemed to work with any bar codes we could chuck at them. UPC, EAN, Interleaved Two of Five, Three of Nine, the lot. And we did experiment with any bar code we could find! The only thing that could throw those readers off, was if you changed encodings partway through, which obviously is never going to happen in real life {just a stupid quirk of the label printers we were using}. But this was a testing lab and we liked breaking things :)

nadroj 01-16-2006 04:55 PM

Alright guys :D

Thanks alot for all the information, the couple links, and input. ill check the sites for some prices and further info.

im not too sure what specification/protocol of barcode the company im working with has on their products.

i think some readers also come with development kits and manuals.. so that would help too.

again thanks for the input, ill be looking into it


All times are GMT -5. The time now is 03:19 AM.