santigimeno / node-pcsclite

Bindings over pcsclite to access Smart Cards
ISC License
170 stars 127 forks source link

Windows "SCardTransmit error: . (0x0000001f)" #57

Open OgNellis opened 8 years ago

OgNellis commented 8 years ago

Windows 7 x86

reader.transmit(new Buffer([0x00, 0xB0, 0x00, 0x00, 0x20]), 200, protocol, function(err, data) {
   if (err) {
      console.log(err);
   } else {
       console.log('Data received', data);
       reader.close();
       pcsc.close();
   }
});

I've got the error in the callback. "SCardTransmit error: �������������� � ������� ���������� �� ��������. (0x0000001f)" My Windows is on Russian and this can be cause this strange "question marks"

santigimeno commented 8 years ago

From https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx it looks a problem with the device itself

ERROR_GEN_FAILURE

    31 (0x1F)

    A device attached to the system is not functioning.

We should try to resolve the message encoding issue though

santigimeno commented 8 years ago

@OgNellis just to make sure it's not a problem with github... do you see the error message correctly in your computer or with the question marks?

atallo commented 6 years ago

Any solution or round trip?

riyupatel commented 4 years ago

@santigimeno i start "Smart Card" and "Smart Card Device Enumeration Service" in services on Windows 10 , but even so i face this error C:\node_pro\node_modules\pcsclite\lib\pcsclite.js:39
var p = new PCSCLite(); ^ Error: SCardEstablishContext error: The Smart Card Resource Manager is not running. (0x8010001d)

card reader : verifone vx 520 (connected via USB Serial Device(COM3))

riyupatel commented 4 years ago

@santigimeno i start "Smart Card" and "Smart Card Device Enumeration Service" in services on Windows 10 , but even so i face this error C:\node_pro\node_modules\pcsclite\lib\pcsclite.js:39 var p = new PCSCLite(); ^ Error: SCardEstablishContext error: The Smart Card Resource Manager is not running. (0x8010001d)

card reader : verifone vx 520 (connected via USB Serial Device(COM3))

plz reply @santigimeno

martinpaljak commented 4 years ago

@riyupatel fix your pc/sc installation, this project can't fix broken or missing windows drivers.