pokusew / node-pcsclite

Bindings over pcsclite to access Smart Cards
ISC License
60 stars 54 forks source link

Reader serial number #17

Closed wopol closed 4 years ago

wopol commented 6 years ago

I would like to connect to reader even if a card is not nearby. Is it possible? I would lik to get unique reader serial number. I am able to do this, when card is nearby:

var packet = new Buffer([0xFF, 0x70, 0x07, 0x6B, 0x08, 0xA2, 0x06, 0xA0, 0x04, 0xA0, 0x02, 0x82, 0x00])

reader.connect({ share_mode : this.SCARD_SHARE_SHARED }, function(err, protocol) {
    reader.transmit(packet, 64, protocol, (err, response) => {
        console.log("RESPONSE",  err, response);
    });
});

But when card is nearby this don't works.