views:

678

answers:

2

Hi!

I want to create an application, where i can set, what prefix or suffix i want to send to the Barcode reader. The barcode reader may connect to the PC with USB or RS-232 ports. I mean if i have a barcode like "4567", and i set in my application that it should send a prefix like "123" to the barcode scanner, than if i read my barcode ("4567") into a notepad it should display "1234567". Hope you understand what i want.

My question is, that is this possible even? If yes, than where should i start? If it is possible, than i want to create my application in C or C++.

Thanks!

Update:

I need to use Symbol LS2208 Barcode Reader. Using the programming guide i was able, to put one charachter before the barcode, but i need 4 (at least). Other possibility is to put 3 charachters before the barcode, but i can't bring this method to work, and if i were able, then i should put the 4th digit there somehow.

Correct me if i'm wrong, but shouldn't be there a possibility to do programmatically what i want? I think it should work like this: connect to the USB/serial port. Capture if the user did read something with the barcode reader. After capturing modifying it, and then put it there where it has been read.

A: 

According to the Symbol LS2208 Product Reference Guide, it says you can set up to four digits for prefix and suffix. It looks like the USB interface just acts like a keyboard input or like a serial input (configurable).

Update: the four digits are a special character code. I.e. you only get one character for the four digits.

Harvey
You made the same mistake as i did :) Those four digit's mean only one charachter! If you see, there is a table earlier, which contains foru digit numbers and the single character according to them. There is a way, to enter a 3 digit number, which should be almost what i want, but i can't bring it to work (and i need 4 charachters not 3).
kampi
Harvey
@Harvey: In the programming guid, there is one possibility to set three charachters but i can't to do this. Obviously i'm doing something wrong, but i don't know what. However if i could create an application which i wan't then i could edit the code how i want. The question is, how to do that programmatically?
kampi
@kampi: I think it just works like a serial port. You read from it just like it's a terminal. When it scans a bar code it just puts the number in text into the stream and you just read it like you would stdin or a file. I don't know how to do that on Windows, though.
Harvey
A: 

This may not answer your question, but here goes anyways.

We use Symbol barcode readers (Used to be Serial, Now USB to Serial Port converters) reading from the serial port. Our code is written in Java and use the Java Communications API (Reads/Writes Serial/Parallel ports). We then take the input from the Serial Port and send it to the window that has the focus in a Swing Application. Since the application has access to the inbound stream we can modify the stream however we want.

Romain Hippeau