Use the protocol parameter in CardReader.transmit

- We were simply hard-coding the T=0 protocol.
This commit is contained in:
Santiago Gimeno
2013-10-16 10:29:11 +02:00
parent 040f91c7b9
commit 3cb970a04b
3 changed files with 4 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ pcsc.on('reader', function(reader) {
console.log(err);
} else {
console.log('Protocol(', this.name, '):', protocol);
reader.transmit(new Buffer([0x00, 0xB0, 0x00, 0x00, 0x20]), 40, 1, function(err, data) {
reader.transmit(new Buffer([0x00, 0xB0, 0x00, 0x00, 0x20]), 40, protocol, function(err, data) {
if (err) {
console.log(err);
} else {