Comments (4)
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.
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.
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.
Yes, I can reproduce the result on Windows.
It's clear now. Thanks!
from pcsc.
Related Issues (20)
- UART pins in BCM mode compatibility HOT 6
- Error symbol SCARD_E_UNKNOWN_RES_MNG should be SCARD_E_UNKNOWN_RES_MSG HOT 1
- bootstrap failure HOT 2
- Installation problems / Compile problems: could we abandon GNU configure and switch to cmake or meson/ninja? HOT 1
- pcsc-spy triggers crash dialogue on MacOS X when hitting `ctrl-c` HOT 2
- pscsd '/run' path ignores configure setting HOT 1
- [Build] Meson ignoring prefix for binary location HOT 3
- [Build] Meson build does not link against systemd
- Meson is missing the creation of doxygen.conf HOT 5
- undefined reference to `pcsc_assert_wire_constants' error when cross compiling with newest 2.2.0 version HOT 1
- undefined reference to `pcsc_assert_wire_constants' error when cross compiling with newest 2.2.0 version HOT 5
- CCID should use CLOCK_MONOTONIC when possible HOT 6
- Bluetooth smart card reader HOT 6
- Problem building pcsc-lite 2.2.1 on Slackware 15 with meson HOT 15
- SCardGetStatusChange: Race condition when attaching multiple readers at the same time HOT 8
- meson setup builddir error HOT 3
- Problem with usbdropdir' HOT 7
- YubiKey(s) recognised "wrongly" HOT 6
- How to use PCSC as a library HOT 4
- not able to compile on macos AX_RECURSIVE_EVAL HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcsc.