@Paul_KD7HB, are you referring to code-39 and the likes?
If so, I don't think that that is relevant; it's the way the lines on the barcode are coded to represent an identifier. To my knowledge, barcode readers just spit out text.
You're right. I'm not reading the barcode, but rather getting the information from an rfid reader. The rfid reader gives an EPC, and it has various varieties. The one I'm interested in is SGTIN-96.
I just need the arduino to spit out the parsed text, like any barcode scanner would.
Use Serial.print().
You have to have a program running on the PC to monitor the input, regardless of whether that input comes from a barcode scanner or the Arduino. If the bar code scanner pretends to be a serial input device, you are almost done. Just send the same characters that the scanner does.
Usually (or in the past) the cheap USB barcode scanner look like a keyboard to the PC they are connected. Scanning a barcode just sends the number as keyboard key presses.
You see, I have tested the following barcode scanner : Symbol barcode scanner ls2208
When I connect it to my PC, scan something, it just spits out the digits.
I have also hooked it up to a Square's Register, that does inventory/checkout, and the register automatically accepts the output from the scanner, and looks up the item.
As I've already mentioned, that I'm just trying to mimic that functionality. As previously mentioned, I read the EPC from a RFID reader, and parse the UPC out of it.
Funnily enough, when I connect an USB keyboard to the Square's Checkout Register, it doesn't accept any character input. This leads me to think, Square only looks for Product_ID and Vendor_ID and if it's that of a barcode manufacturer, it does something meaningful with the input.
So, I want to know, is there a way, where I can program the EEPROM so I can change the Vendor_ID and Product_ID of the Arduino.
So, when I attach it to the Square's Register, it still thinks that the input is coming from a Symbol's Barcode Scanner ?
The scanner is claimed to interface to a variety of host ports, including RS232, so there will be no major diificulty to emulate it with an Arduino, using RS232 for example.
You will need to determine the exact protocol. "Spits out characters" is not helpful.
What software inputs those characters, and what does that software do with them?
As I mentioned, I intend to connect the arduino to a Square Register, so as you scan an item, it parses out the UPC, and the internal software of Square accepts the output from the Arduino, and pulls up that product/item. That's it.
I'm sure as far as emulating an arduino to behave a barcode scanner goes, it is not a big deal, because my preliminary research reveals that some people have even tried that.
My thinking is, Square probably does the same too. Hence I was asking if it's possible to change the Vendor_ID and Product_ID by programming the EEPROM.
Hence I was asking if it's possible to change the Vendor_ID and Product_ID by programming the EEPROM.
That would depend entirely on how you decide to have the Arduino mimic the device, but the IDs (if they need to be changed) would be in the Arduino code, not the EEPROM.
sterretje:
OP clearly mentions HID. An I missing something?
Just my 2¢ in response to the above...
The old style bar code scanners were interfaced to a computer via what is called a "keyboard wedge"; and were originally implemented on the old XT/AT keyboard interface (5-pin DIN) connector, and later via the PS/2 keyboard (6-pin mini-DIN) connector.
Simplistically speaking, the "keyboard wedge" implements a logical "OR-ing" of the keyboard and barcode scanner outputs, utilized as an input to the host computer. This was the basic scheme used to get the scanner output--in the form of keyboard scan codes--into the host computer, without disturbing the ability to use the keyboard as a primary input device.
Their communications conformed to the XT/AT keyboard scan code protocol protocols at the time; and later versions of barcode scanners conform to the USB-HID (Human Interface Device) specification.
In either interface instance, the barcode scanner output appears to the computer as native alpha-numeric key presses.
It's a damned inefficient system, but one that grew out of necessity because of the port limitations of the computers we had, back in the 1980's. It seems that the barcode scanning industry, much like the US auto industry, is resistant to change.
As sterretje says, "[Use an] Arduino Leonardo or Micro, Sparkfun pro micro, [or a] Teensy".