Comments (8)
Fixed in pcsc-lite 2.3.0.
See https://blog.apdu.fr/posts/2024/08/improved-scardgetstatuschange-for-pnpnotification-special-reader/
from pcsc.
Does it solve the problem for you?
yes it does! thank you 👍
from pcsc.
Yes, it is a known limitation of SCardGetStatusChange()
. You can't detect a reader connection/disconnection between 2 calls of SCardGetStatusChange()
.
One solution would be to use dwEventState
for the special reader \\?PnP?\Notification
to store the number of reader events. If that number has changed between two calls of SCardGetStatusChange()
then we return.
This field is already used by Windows to store the number of readers. I could not find the documentation for that.
See https://salsa.debian.org/rousseau/PCSC/-/issues/5
from pcsc.
Thank you for your response. IMHO an event count would be better as the number of readers may loose events if a reader is detached and another is attached between two calls of SCardGetStatusChange()
. However, that seems rather theoretic and I cannot oversee the Windows / macOS situation.
I read your comment I don't think it is a good idea to implement something that would work for pcsc-lite only, and not for Windows or macOS.
so that this will not / cannot be fixed any time soon, sadly. Feel free to close this ticket if you like.
from pcsc.
I may implement the idea I presented. It will only work on GNU/Linux but at least it would be possible to have a "safe" SCardGetStatusChange()
on this platform.
I do not expect Apple or Microsoft to do anything on their own implementation of WinSCard.
from pcsc.
I think I fixed the issue in a beta version.
See http://lists.infradead.org/pipermail/pcsclite-muscle/2024-June/001498.html
from pcsc.
Hello @kgraefe
Have you had a chance to test my proposed code?
Does it solve the problem for you?
from pcsc.
It's on my list. I could not find the time yet.
from pcsc.
Related Issues (20)
- [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
- 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
- Backward protocol compatibility HOT 2
- Build issue with Meson not linking libpcsclite against libpthread HOT 3
- Fixing pkg-config file HOT 2
- pcscd build feature "filter" not reported HOT 1
- SCL011G Contactless Reader not initialized correctly. Unusable. HOT 3
- Declared version in autoconf is out of sync HOT 2
- LIBUSB_ERROR_TIMEOUT on first connect HOT 2
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.