Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-13-2006, 05:34 PM
|
#1
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Rep:
|
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
|
|
|
01-13-2006, 06:32 PM
|
#2
|
Member
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294
Rep:
|
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.
|
|
|
01-13-2006, 06:37 PM
|
#3
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Original Poster
Rep:
|
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
Last edited by nadroj; 01-13-2006 at 06:38 PM.
|
|
|
01-13-2006, 06:53 PM
|
#4
|
Senior Member
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065
Rep:
|
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 ?
|
|
|
01-13-2006, 07:07 PM
|
#5
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Original Poster
Rep:
|
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.
|
|
|
01-16-2006, 09:15 AM
|
#6
|
LQ Newbie
Registered: Apr 2004
Location: East Midlands
Distribution: Debian SID; Mandrake
Posts: 17
Rep:
|
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.
|
|
|
01-16-2006, 09:29 AM
|
#7
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
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.
|
|
|
01-16-2006, 10:59 AM
|
#8
|
LQ Newbie
Registered: Apr 2004
Location: East Midlands
Distribution: Debian SID; Mandrake
Posts: 17
Rep:
|
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 
|
|
|
01-16-2006, 04:55 PM
|
#9
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Original Poster
Rep:
|
Alright guys
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 05:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|