Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of a reader.control function #65

Open
barisvelioglu opened this issue Feb 15, 2017 · 2 comments
Open

example of a reader.control function #65

barisvelioglu opened this issue Feb 15, 2017 · 2 comments

Comments

@barisvelioglu
Copy link

I am using ACR1252U-A1 for reader. I cannot do any transmit operations succesffully but I cannot get any response by using control command.

What I tried is

reader.control(new Buffer([0xE0, 0x00, 0x00, 0x18, 0x00]), 3500, 30, function(err, data)[
  console.log(data) // undefined
});

image

@boris-savic
Copy link

Control code should be set based on your OS.

So instead of directly using 3500 set it with reader.SCARD_CTL_CODE(3500)

reader.control(new Buffer([0xE0, 0x00, 0x00, 0x18, 0x00]), reader.SCARD_CTL_CODE(3500), 30, function(err, data)[
  console.log(data) // undefined
});

@ellenlowing
Copy link

That works like a charm. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants