Program to use barcode input

Sharky Forums


Results 1 to 4 of 4

Thread: Program to use barcode input

  1. #1
    Goldfish qwe's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    69

    Program to use barcode input

    I am trying to write a program to capture and use input from a barcode scanner. The barcode scanner is interpreted as a second keyboard when plugged into a computer (vis USB). I am trying to write a program that will capture all of the input from the barcode scanner (2nd keyboard) but none from the main keyboard. The problem is I don't really know where to start. I am using linux (ubuntu) and I've tried catching the input from /dev/input/by-id/barcode_reader and from /dev/input/input17 but it doesn't seem to work. Can anyone give me some advice on what to read to learn more about this?
    Possesions never meant anything to me,
    I'm not crazy.
    Well that's not true I have a bed,
    and a guitar and a dog named dog.

  2. #2
    Great White Shark
    Join Date
    Nov 2000
    Posts
    21,595
    Is your reader output data format for a keyboard wedge or a serial interface?

    Unless you are doing a school project or something similar, why not use any of the free or low cost wedge/serial barcode software that is available.

  3. #3
    Goldfish qwe's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    69
    Mostly because I wanted to try writing it myself so that I get a better understanding of the way the operating system deals with input devices. But also because I want to be able to write my own software for this purpose.
    Possesions never meant anything to me,
    I'm not crazy.
    Well that's not true I have a bed,
    and a guitar and a dog named dog.

  4. #4
    Hammerhead Shark Geforce255's Avatar
    Join Date
    Jan 2003
    Location
    Corona , CA
    Posts
    1,961
    Quote Originally Posted by qwe View Post
    Mostly because I wanted to try writing it myself so that I get a better understanding of the way the operating system deals with input devices. But also because I want to be able to write my own software for this purpose.
    The really simple method is to not worry about the device. The way I do this is to parse the input string - all UPC barcodes must start with a * - if the first character is something different, I discard the string.
    RIG:
    XCLIO 2000 Black & Titanium Case
    KingWin Gold Certified 80+ 1000 Watt PS
    Asus P8Z77-V Premium Motherboard
    Intel Core I7 3770K @ 5.0 gHz
    Corsair CWCH70 Hydro Series H80 CPU Liquid Cooler
    CORSAIR Vengence 16GB
    PowerColor Radeon 7990 6GB
    OCZ Vertex 3 SATA 3 SSD
    1TB WD Black Edition SATA 3 + 3TB Seagate SATA 3
    Panasonic DVD
    Windows 7 Ultimate - 64 bit

Tags for this Thread

Posting Permissions

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