Giter Club home page Giter Club logo

Comments (4)

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

I don't think it is a bug in pcsclite.
Your program works fine if you use:

    err = SCardDisconnect(hCard, SCARD_RESET_CARD);

instead of:

    err = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

You can't (re)connect using a different protocol without powering off or reseting the card first.

Have you tried your program on Windows?
What is the result?

from pcsc.

godfreychung avatar godfreychung commented on August 25, 2024

Here is the result on Windows:

Establishing the context...
Getting reader names...
Reader 0: ACS CCID USB Reader 0
Select reader: 0
Connecting to the reader (shared, T=0 or T=1)...
Disconnecting the reader...
Connecting to the reader (direct, raw)...
Error: SCardConnect failed with error 0x000006F9
Connecting to the reader (shared, T=0 or T=1)...
Disconnecting the reader...
Releasing the context...

It seems that Windows does not support raw protocol.
I modified testraw2.c.txt for testing.

from pcsc.

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

Another test you can make on Windows is to use a card with support of both T=0 and T=1.
First you connect with T=0, disconnect, then connect with T=1.
It should fail the same way as with pcsclite.

from pcsc.

godfreychung avatar godfreychung commented on August 25, 2024

Yes, I can reproduce the result on Windows.
It's clear now. Thanks!

from pcsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.