How to detect a hotplug smart card

I dynamically load the pkcs11 security provider in java and it works as long as the smart card reader is inserted before the application starts. Can someone tell me how to detect the smart card hot button when the application starts? Actually I need something like pcsc_scan in java. Environment - Ubuntu 9.10 with java 1.6.0_20. thanks in advance

+3
source share
2 answers

PKCS # 11 does not define a standard way to actively notify an application about device entry / removal. The best you can do is run a thread that will check the number of slots and their status once per second or so.

+1

API javax.smartcardio.* PKCS # 11?

CardTerminal isCardPresent(), waitForCardPresent(timeout) waitForCardAbsent(timeout), .

+1

Source: https://habr.com/ru/post/1761145/


All Articles