Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Nov 10 2020 09:29
    nlko opened #93
  • Oct 06 2020 09:02
    sambatlim opened #92
  • Sep 22 2020 12:46
    jeppech edited #91
  • Sep 22 2020 12:45
    jeppech edited #91
  • Sep 22 2020 11:24
    jeppech opened #91
  • Sep 05 2020 05:18
    martinpaljak commented #57
  • Sep 02 2020 09:10
    riyupatel commented #57
  • Sep 02 2020 09:09
    riyupatel commented #57
  • Sep 01 2020 14:18
    riyupatel commented #57
  • Aug 30 2020 14:34
    bradocchs opened #90
  • Jan 10 2020 08:35
    rkalkani synchronize #86
  • Jan 10 2020 08:31
    santigimeno commented #86
  • Jan 10 2020 08:27
    rkalkani commented #86
  • Dec 17 2019 23:55
    ellenlowing commented #65
  • Jul 16 2019 10:10
    c0nstructer closed #89
  • Jul 16 2019 10:04
    c0nstructer opened #89
  • Jun 30 2019 20:35
    santigimeno closed #80
  • Jun 30 2019 20:35
    santigimeno commented #80
  • Jun 30 2019 20:31
    santigimeno closed #62
  • Jun 30 2019 20:31
    santigimeno commented #62
Jeppe Christiansen
They just seems to appear, out of nowhere
Jeppe Christiansen
Also, I'm on version 0.4.8
Santiago Gimeno
Hey! Well, the only place where i'm polling is here https://github.com/santigimeno/node-pcsclite/blob/master/src/pcsclite.cpp#L180-L219 and only on OS's where PNP notification is not supported. See: santigimeno/node-pcsclite@5b10f85
For example on OS X, I have to poll in order to find out if there are new readers in the system
The card not transacted error looks like a bogus command send to a card though :/
Jeppe Christiansen
Aha, thanks for the insight, appreciate it. This is a server application, where client's sends data to the cards, so the chances of getting bogus data, is definitely there. Imma setup some more verbose logging on my end. :)
Xasanboy Akbarov
hello actually I was trying to use nfc-pcsc in Electron app but I can't use require with it ? and if I use import it is giving error can you suggest me solution? thanks
Santiago Gimeno
@Tsar8808_twitter what error are you getting?
Martin Paljak
I am a bit confused about reader.close() and pcsc.close() and how to cleanly shut down an application after I am done with the reader I was interested in.
Like. Do I have to call reader.close() after disconnect() ? Both reader.close() and pcsc.close() ?
Then regarding the documentation, it is unclear to me why both call SCardCancel. Are there separate calls? AFAIU only one SCardGetSTatusChange is sufficient to get events for existing and pnp readers.
anyway, calling both is not enough, firstly I get a PCSC error SCardGetStatusChange error: Command cancelled.(0x80100002) when calling pcsc.close()
Martin Paljak
wherever that happens, it should be expected, IMHO SCARD_CANCELLED should never trigger a pcsc error, as that is expected behavior ?
and finally, I still need to call process.exit to quit the app.
after calling reader.close() and pcsc.close()
And thanks for an otherwise charming library, works flawlessly on linux/osx for my needs (other than the clean shutdown issu) :)
Martin Paljak
Once I can resolve the shutdown issue, I have a feature request, regarding transactions (and careful with those on Windows, due to the "5 second rule")
Sometimes an exclusive connection is not available/possible, but reliablity should be assured as much as possible (no interference from other applications) thus I would like to propose an argument to SCardConnect wrapper for non-windows machines, where a transaction would be set on the reader after connect, if specified so in options
(looking at gitter activity it seems to be as heavily used as ... not at all. I will file issues as well, for better tracking)
Martin Paljak
Santiago Gimeno
@martinpaljak hey
would love to have code that reproduces the error, I've fixed similar errors in the past :)
WRT to transactions, would you be up to implementing them? I'm no already using them but would gladly accept PR :)
Barış Velioğlu

Hi @santigimeno. I am using windows 10. I have node v6.10.3. When I install pcsclite 0.5.0, and running example code, it says


Barış Velioğlu
Ok the problem is solved by rebuild buffertools module.
Martin Paljak
I have shifted away from node back to java/c++ for a while.
Will check back once in JS sphere.
hi @santigimeno
do you have a port for this lib in typescript?
but i dont see any .ts files only js
guys is there a typescript library available for pcslite?
Santiago Gimeno
@nickkhan no that I know of. There was some talk about it some time ago but nothing came out of it: santigimeno/node-pcsclite#63
Hakan Pinar
@barisvelioglu What is code that you write for the rebuild?
Pureewat Kaewpoy
Hello Are your have a problem with Insufficient Buffer on 0xFF Lc ?
Sergey Novikov
How can I read the card number using the node-pclite library?
Sergey Novikov
I ran the code from the example, but got the error:
Status( ACS ACR1252 1S CL Reader [ACR1252 Dual Reader PICC] 00 00 ): { state: 65570,
atr: <Buffer 3b 8f 80 01 80 4f 0c a0 00 00 03 06 03 00 01 00 00 00 00 6a> }
card inserted
Protocol( ACS ACR1252 1S CL Reader [ACR1252 Dual Reader PICC] 00 00 ): 2
[Error: SCardTransmit error: Transaction failed.(0x80100016)]
Status( ACS ACR1252 1S CL Reader [ACR1252 Dual Reader PICC] 00 00 ): { state: 131090, atr: <Buffer > }
card removed
anyone know that how to write data to card using node-pcsclite ??
@santigimeno hi, i started implementing your pcsclite library to wrap it into TypeScript version, link here https://github.com/lewixlabs/TsCard
my TypeScript wrapper project, https://github.com/lewixlabs/TsCard, can now detect reader, smartcard and send apdus
working for many years with memory cards too :), i'm implementing SLE support with ACR Reader, if somebody can contribute or wants to suggests me improvements, he's welcome :)
I used Promise pattern with async/await
Sai Kishore Komanduri
Can we use pcsclite on the browser?
Luigino De Togni
Hi! I developed a cross platform app thanks to TsCard https://github.com/lewixlabs/TsCard (node js library built upon node-pcsclite). This app is charta https://github.com/lewixlabs/charta
with this app you can send apuds to asynchronous cards (emv, etc) or memory card like siemens sle
@santigimeno Hi, I am getting the following error when using library, I would really appreciate your help if possible please to see when this happens: [2020-03-08T18:24:44.410] [ERROR] ALL - [Error: SCardTransmit error: Transaction failed.(0x80100016)]

hello @santigimeno, i am getting error in pcsclite module in windows 10
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))
system : windows 10

thank you