Smart Card reader not detecting the readers and not getting status

121 Views Asked by At
from smartcard.System import readers

reader_list = readers()

if len(reader_list) == 0:
    print("No smart card reader found.")
else:
    for reader in reader_list:
        connection = reader.createConnection()
        connection.connect()

        card_present = connection.isCardInserted()
        if card_present:
            print(f"Card is present in reader: {reader.name}")
        else:
            print(f"No card in reader: {reader.name}")

        connection.disconnect()
0

There are 0 best solutions below