Handheld Scanner with nodejs and OPOS

655 Views Asked by At

I was struggling with this for a couple of days now and Google seem to have no information..

I'm trying to interface a DataLogic-QuickScan-QD2131 scanner using OPOS (under windows 10, RS-232 OPOS interface) with nodejs.

I understood that OPOS uses ActiveX controller to communicate, so i use the winax npm-package to create ActiveXObject reference, but I have no idea what is the "class string" i should provide to the constructor.

Here's my code:

require("winax");
const con = new ActiveXObject("OPOSService.OPOSScanner");
console.log(con);

this will fail with the following error:

Uncaught Error: CreateInstance: OPOSService.OPOSScanner Invalid class string

Thanks guys!

1

There are 1 best solutions below

2
On

You probably should stop using OPOS from Node.js.
As I answered your other question, the current OPOS only supports 32bit.

If you still want to use it, find and specify the programmatic ID string for the scanner OCX in DataLogic's OPOS.
I don't have any information about what it looks like, so you can find it yourself or contact DataLogic.

As an alternative, obtain and install the Common CO from the following page and specify "OPOS.Scanner" as the programmatic ID.
MCS: OPOS Common Control Objects - Current Version


If you have a combination of Node.js and a barcode scanner in serial port mode, it would be better to send commands and receive barcode data directly from Node.js using the serial port instead of OPOS.