Description
Greetings, I've been testing a few cordova plugins for nfc and barcode-reading via device camera and was excited to see this plugin available as well. I'm hoping to pull scanned data from a tiny thumb-scanner using an HTC One running Android 6, an OTG cable and this plugin.
I've tried various combinations with VID/PID specified and the ProlificSerialDriver
that it should be using but it appears consistently unable to connect hitting the first error callback with the message:
ControlTransfer with value 0x0 failed: -1
I believe everything is in place to specify the connection, rather than assuming the defaults, even though it should pretty much match those but have yet to successfully connect with the device. I'd certainly appreciate any pointers if there is something simple I'm missing.
The request looks something like:
serial.requestPermission({
vid: '065A',
pid: '0009',
driver: 'ProlificSerialDriver'
},
function(successMessage) {
serial.open(
{baudeRate : 9600, dataBits: 8, parity: 0, stopBits: 0, "dtr":false},
function(successMessage) {
alert('Open Success! ', successMessage);
serial.writeHex('01 02 00 9f de',
function(successMessage) {
alert('Write Success: ', successMessage);
},
errorCallback
);
},
errorCallback
);
},
errorCallback
);