Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Smart Card Resource Manager is not running. (0x8010001D) #168

Closed
syariffortask opened this issue Apr 30, 2024 · 14 comments
Closed

The Smart Card Resource Manager is not running. (0x8010001D) #168

syariffortask opened this issue Apr 30, 2024 · 14 comments

Comments

@syariffortask
Copy link

Your system information

  • Operating system used: windows 11
  • pyscard version:2.0.8
  • Python version: 3.11.8

Please describe your issue in as much detail as possible:

The Smart Card Resource Manager is not running. (0x8010001D)

Describe what did happen.

I was confused because there was an error: Failed to establish context: The Smart Card Resource Manager is not running. (0x8010001D), but I have run the smartcard service on windows service, can it help me

Steps for reproducing this issue:

and this is my code.

from smartcard.Exceptions import NoCardException
from smartcard.System import readers
from smartcard.util import toHexString

try:
    available_readers = readers()
    if not available_readers:
        print("Tidak ada pembaca kartu pintar yang tersedia.")
    else:
        for reader in available_readers:
            try:
                connection = reader.createConnection()
                connection.connect()
                
                atr = toHexString(connection.getATR())

                print("Pembaca:", reader)
                print("ATR:", atr)
            except NoCardException:
                print("Pembaca:", reader)
                print("Tidak ada kartu yang dimasukkan.")
except Exception as e:
    print("Terjadi kesalahan:", e)
@LudovicRousseau
Copy link
Owner

What did you do to get the error?
Have you removed the reader?

See also #136 #153

@syariffortask
Copy link
Author

  1. I use the ACS 120U reader, I want to learn to use the Smartcard Reader in my Python program, but when I run the program to see the available readers I get this error

  2. Yes, I have removed the reader

@LudovicRousseau
Copy link
Owner

You get the error AFTER you removed the reader?

Please describe exactly what you do and what you get.

@syariffortask
Copy link
Author

syariffortask commented May 1, 2024

I have run my code with the smartcard reader plug in my computer's USB port, but when I run my program above there is an error, this is the error "The Smart Card Resource Manager is not running. (0x8010001D)"

@LudovicRousseau
Copy link
Owner

The error is returned by Windows itself.
Maybe you reader driver is not installed or something like that.

@syariffortask
Copy link
Author

But i have already install driver for acs reader 120u

@LudovicRousseau
Copy link
Owner

I can't help on Windows.
Maybe ACS can provide some support.

@mbokil
Copy link
Contributor

mbokil commented May 1, 2024

Windows requires the Smart Card service to be running. Sometimes you have to enable it before you can communicate to a NFC reader. https://answers.microsoft.com/en-us/windows/forum/all/smartcard-resource-manager-is-not-running/b9aefb42-9d43-4356-8d63-341d2b1bba4a

@syariffortask
Copy link
Author

I've already runing smart card service

@mbokil
Copy link
Contributor

mbokil commented May 2, 2024

One other thing with Windows we found is after the user plugs in the NFC reader we always have them restart. We found the device drivers that install via plug and play often times need to be restarted. Then Python will be able to communicate to the device via SWIG.

@syariffortask
Copy link
Author

still can't solve this isue, anybody can help please

@LudovicRousseau
Copy link
Owner

@syariffortask have you asked Microsoft?
You've bought a Windows license, so you should receive technical support for Windows-related problems. No ?

@syariffortask
Copy link
Author

I have already ask Microsoft but Microsoft still can't reply my message

@LudovicRousseau
Copy link
Owner

This is a Windows issue.
PySCard can't fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants