Dealing with a Microvision ROV barcode scanner can be quite tricky. Of course, the device is scanning bar-codes immediately. But the data is sent in a special format and requires a confirmation by the receiver. That's the reason for this blog entry.
The ROV scanner appends a 4 digit serialization number to each scanned bar-code. This serialization number is sent (along with the barcode data) to the receiver. The receiving device is required to acknowledge the bar-code by sending back the serialization number along with an appended ACK character (hex 06) to the ROV scanner.
Now let's demonstrate how to configure TEC-IT's software wedge TWedge to work with a Microvision ROV scanner.
Use a Microvision ROV Scanner With TWedge
TWedge is a software solution for reading data from RS232, USB (via virtual serial ports), TCP/IP and Bluetooth devices. The built-in scripting capabilities enable you to process the received data (e.g. send the data to any application by simulating keystrokes) or to implement the confirmation scenario outlined above.Use this JavaScript snippet for the OnData section in the script editor of TWedge (you may also download the TWI).
TWedge OnData Script for Microvision ROV MS2200-BT
var myData;
var SerializationNumber;
myData = DATA.replace (/\x02/g, ""); // remove {STX}
myData = myData.replace (/\x0D\x0A/g, ""); // remove {CRLF}
// Microvision's documentation says the following:
//
// The serialization number are represented by the last four digits of the bar code.
//
// The serialization number are represented by the last four digits of the bar code.
// Send the serialization number with an ACK (hex 06) character to the
// scanner to acknowledge and delete the bar code. If the scanner has bar
// codes buffered then it sends the first stored bar code, deletes that
// bar code after it is acknowledged, and then sends the next stored bar
// code. This process continues until all bar codes have been sent.
SerializationNumber = Right (myData, 4);
WriteToDevice (SerializationNumber + "\x06", 500);
// Prepare the read data to simulate keystrokes (remove Serialization Number)
myData = Left (myData, myData.length - 4);
SendKeyStrokes(myData.replace (/\x00/g, " "));
SendKeyStrokes("{ENTER}");
Give it a try!
Download and check out the software wedge TWedge for free. The finished configuration file (TWI file) for this blog post is available here.Comments and suggestions regarding this article are welcome. Please feel free to contact us via MSN or email if you are facing any problems.
Update
The post How to use a Microvision ROV bar-code scanner with Android explains how to configure the scanner to work without serial numbers, buffering or special protocol requirements.About TEC-IT
WWW.TEC-IT.COM |
All trademarks are the property of their respective owners.
0 comments:
Post a Comment