desionlab / node-cashcode-bv

Library for working with "CashCode" Bill Validator devices from Node.js app.
MIT License
11 stars 8 forks source link

Bill types is not enabled in cashcode bill validator #6

Open sarathjasrin opened 5 years ago

sarathjasrin commented 5 years ago

I tried to connect cashcode bill validator using ccnet protocol implemented in node js. I tried to enable billTypes it's showing any error. When I tried to print the BillTypes it's showing enabled as false.

    [ { amount: 1, code: 'QAT', enabled: false, security: false },
  { amount: 5, code: 'QAT', enabled: false, security: false },
  { amount: 10, code: 'QAT', enabled: false, security: false },
  { amount: 50, code: 'QAT', enabled: false, security: false },
  { amount: 100, code: 'QAT', enabled: false, security: false },
  { amount: 500, code: 'QAT', enabled: false, security: false }]

My bill validator model: MSM-QA1112

fenixphp commented 5 years ago

Sample code you used?

sarathjasrin commented 5 years ago

I used the example code from the repo.

const { CCNet } = require('cashcode-bv');
let device = new CCNet.BillValidator('COM3');
async function init (){
   await device.connect();
  console.log(device.info);
  console.log(device.billTable);
}
init()
.then(function () {
  console.log('Ok.');
})
.catch(function (error) {
  console.error(error);
});
fenixphp commented 5 years ago

Yes, there were problems with this; at the time of its creation the library did not have to correct this. In addition, the behavior of the device does not correspond to the documentation. In the second version it should be improved, but when I finish, I don’t know. There is no time allocated for this project. The new version is in the "refactoring" branch, but it is not ready.

sarathjasrin commented 5 years ago

First of all thanks for the project. You already put good amount of time creating this project hopefully you will finish soon. Till I have to wait and I have no choice. God bless you.