[Python] read mifare classic with pyscard using Dell ControlVault 3 contactless

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    I have Dell Latitude 5430, which has Dell ControlVault 3 contactless smart-card reader with NFC.

    Here are its specs:

    Dell Broadcom Smartcard Reader

    In windows device manager, they appear as:

    [​IMG]

    Using python's pyscard, I can already process a Desfire card:

    from smartcard.scard import *

    def select_reader():
    for reader in readers():
    print(reader)
    if reader.name == 'Broadcom Corp Contactless SmartCard 0':
    return reader

    reader = select_reader()
    cxnToCard = reader.createConnection()
    cxnToCard.connect()
    protocol = cxnToCard.component.getProtocol()
    pcscprotocolheader = translateprotocolheader(protocol)
    SCardTransmit(cxnToCard.component.hcard, pcscprotocolheader, [0x5A, 17, 17, 17])
    SCardTransmit(cxnToCard.component.hcard, pcscprotocolheader, [0x71, 0, 0])
    ...


    Until here, all is fine!

    But when I want to process a NXP Mifare Classic 1k card, I have tried every thing but always seen the same result:

    SW1: 0x6A SW2: 0x81


    I have seen examples of commands like 0xFF 0x82 (load key to the reader), 0xFF 0x86 (authenticate), or others, but there is no way that I could get work any command to the Mifare.

    I have also tried to transmit the same commands with:

    cxnToCard.transmit


    instead of SCardTransmit; I do not know if there is a difference, but the result is the same.

    From specs it is seen that Mifare Classic 1k is supported!

    Since I get always 0x6A 0x81, I am sure that I am missing some principle thing; I am using a wrong protocol, wrong command set, wrong command format, or whatever.

    I also did not understand if this reader acts like pcsc or what. Also beside all searches, it was impossible to find any documentation for this reader.

    What am I missing?

    How can I process Mifare Classic 1k with this reader?

    Where can I find any doc to see how to use this reader?

    Continue reading...

Compartilhe esta Página