How to read from physical barcode scanner
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: How to read from physical barcode scanner

Hybrid View

  1. #1
    Join Date
    May 2012
    Posts
    5

    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

  2. #2
    Join Date
    May 2012
    Posts
    5

    Re: How to read from physical barcode scanner

    Of course, is between a hammer and a hard place, sorry for that

    SxN

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,309

    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.

  4. #4
    Join Date
    May 2012
    Posts
    5

    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

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,309

    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.

  6. #6
    Join Date
    Feb 2012
    Location
    Strasbourg, France
    Posts
    116

    Re: How to read from physical barcode scanner

    Most of the time barcode reader behaves like keyboards, no ?

  7. #7
    Join Date
    May 2012
    Posts
    5

    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

  8. #8
    Join Date
    May 2012
    Posts
    5

    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

  9. #9
    Join Date
    Jan 2013
    Posts
    2

    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!

  10. #10
    Join Date
    Jun 2014
    Posts
    1

    Re: How to read from physical barcode scanner

    Quote Originally Posted by SxN02 View Post
    > 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?

  11. #11
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,838

    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.
    Last edited by DataMiser; February 1st, 2013 at 03:45 PM.
    Always use [code][/code] tags when posting code.

  12. #12
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,838

    Re: How to read from physical barcode scanner

    Quote Originally Posted by donnygross View Post
    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.
    Always use [code][/code] tags when posting code.

  13. #13
    Join Date
    Mar 2013
    Posts
    1

    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.

  14. #14
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,838

    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.
    Always use [code][/code] tags when posting code.

  15. #15
    Join Date
    Jun 2014
    Posts
    1

    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.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center