springcore.scard.Card

*** PRELIMINARY ***

The springcore.scard.Card class gives access to any smart card connected to a SpringCore device. This includes the NFC (contactless) cards, the contact (SAM) cards if the device features one or more SAM slots, and the secure element(s) of the device.

To ease the developer’s job, the springcore.scard.Card class is partially inspired by smartcard.CardConnection from Python’s PyScard module. Anyway, there are some huge differences since the PyScore engine runs in the SpringCore device itself, instead of relying on the computer’s PC/SC stack.

Class documentation

Type Name Description
Method connect Power up the card (if the card is already powered, this function does nothing; to reset the card, use reconnect instead)
Method disconnect Power down the card
Method getATR Return card ATR
Method getProtocol Return bitmask for the protocol or connection, or None if no protocol set. The return value is a bit mask of Card.T0_protocol, Card.T1_protocol or Card.NFC_protocol
Method getReader Return card connection reader
Method getType Return card underlying protocol (NFC cards only) The return value is Card.NFC_A, Card.NFC_B, Card.NFC_V, Card.NFC_F, etc.
Method reconnect Reset the card
Method transmit Transmit an APDU

Constructor

The Card class does not have any publicly-available constructor. Instanciation can only be done through the getCard method of the CardReader object.