Connecting to barcode scanner
Hello, I am having some trouble working out a functional one way connection with barcode scanner. It's supposed to be a really simple connection, when the scanner scans a barcode, event activates in main form and after that its all internal logic.
Problem is, due to reasons we are unable to use OPOS connection, so we decided to use serial port connection, but that brought even more problems. The device randomly disconnects, causing the port to stay open, unable to reconnect to it, requiring whole restart of PC, sometimes even several times. Or in other instances, while it appears to be connected, port is open and everything seems fine, the SerialPort.DataReceived event doesn't fire.
After months of trying to troubleshoot this, I kind of gave up on the serial port connection, is there any other way how to do a simplistic connection to barcode scanner?
5 Replies
Depends entirely on the scanner. The ones I've worked with were all USB and just acted like keyboards. They literally typed the characters it decoded then sent an "enter" keypress
Yeah, thats not really viable, as the scanned barcodes arent really text to be written somewhere but more like instructions for the app what to do
Still, it depends entirely on the scanner itself.
Gryphon 4500 but it doesnt really matter, i am currently looking into options of connecting to it as USB HID device, but accepting the input only in the background
One would think connecting to scanner would be easier than this..
Indeed it is very easy
Most scanners are acting like a keyboard and that makes it very easy to handle