pcsc

Determine card type from ATR

爱⌒轻易说出口 提交于 2019-12-03 08:31:37
Is it possible using ATR to determine whether I have ISO14443A or ISO14443B type card? If yes, how? Michael Roland As mictter correctly explained , a real AT R only exists for ISO 7816 contact cards. I can follow the argumentation that the ISO 14443 equivalent could be the ATQA/ATQB as this is the first answer you get from tags after activation, though I would rather say that the equvalent of the ATR is a combination of ATQA + SAK + ATS (for Type A) and a combination of ATQB + Answer to ATTRIB (for Type B). Regarding the ATR you see, I assume that this is a PC/SC-emulated ATR according to the

How to send APDU to Mifare Classic 1k card?

末鹿安然 提交于 2019-12-03 03:44:01
What I am trying to achieve is to send APDU command to MIFARE Classic 1K card to change its A and B keys. I was able to establish a connection with the card and use a default key ( FFFFFFFFFFFF ) to read block 0 and block 1. I used HID MifareSamples application for it. Now, I would like to change A key from default to something else. I found a solution here, at stackoverflow ( Mifare Change KEY A and B ) which suggests that I have to send this APDU: New key A = 00 11 22 33 44 55 Access bits not overwritten Key B not used (so FF FF FF FF FF FF) => Write to Sector Trailer 00 11 22 33 44 55 FF 0F

Sending APDU with winscard.dll (PC/SC) without a smart card connected

爷,独闯天下 提交于 2019-12-02 16:04:45
问题 I'm trying to send APDU commands to the card reader itself instead of the Smart Card. The test command I'm using turns the RF field on and off. This commands sends over SCardTransmit if I first connected to a smart card. But as soon as the RF field is off, the card disconnects and I cant send another APDU to turn the field on. Basically is there any way to send APDU's over pc/sc without a card present. I want to configure certain parts of the reader before reading a card. Thanks in advance. -

Sending APDU with winscard.dll (PC/SC) without a smart card connected

徘徊边缘 提交于 2019-12-02 09:25:12
I'm trying to send APDU commands to the card reader itself instead of the Smart Card. The test command I'm using turns the RF field on and off. This commands sends over SCardTransmit if I first connected to a smart card. But as soon as the RF field is off, the card disconnects and I cant send another APDU to turn the field on. Basically is there any way to send APDU's over pc/sc without a card present. I want to configure certain parts of the reader before reading a card. Thanks in advance. -----Edit----- As FPGA Warrior mentioned I need to use SCardControl to send APDU commands to the card

Getting PCSC reader serial number with WinSCard

≯℡__Kan透↙ 提交于 2019-12-01 04:31:40
I have a problem with getting PCSC reader serial number if card is not present in the reader. I am using winscard.dll and c++. The following code will work only for the case if card is present in the reader. Otherwise the SCardHandle is not retrieved. I haven't found any other way to get SCardHandle. SCARDHANDLE hCardHandle; SCARDCONTEXT hSC; WCHAR pCardReaderName[256]; LONG lReturn; lReturn = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC); if (lReturn != SCARD_S_SUCCESS) { Console::WriteLine("SCardEstablishContext() failed\n"); return; } my_select_reader(hSC, pCardReaderName); // just

Getting PCSC reader serial number with WinSCard

纵饮孤独 提交于 2019-12-01 02:54:29
问题 I have a problem with getting PCSC reader serial number if card is not present in the reader. I am using winscard.dll and c++. The following code will work only for the case if card is present in the reader. Otherwise the SCardHandle is not retrieved. I haven't found any other way to get SCardHandle. SCARDHANDLE hCardHandle; SCARDCONTEXT hSC; WCHAR pCardReaderName[256]; LONG lReturn; lReturn = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC); if (lReturn != SCARD_S_SUCCESS) { Console:

How to find the device instance id of a PCSC reader

房东的猫 提交于 2019-11-30 17:31:18
问题 Having only a handle and context to a PCSC reader using winscard on Windows >= XP, is there some way to get its device instance id or something else that can be used in the SetupDi* API to find out which driver is loaded for said reader. SCardGetReaderDeviceInstanceId is only available on Windows 8, so unfortunately not for me. As a plan B, all smart card readers could be enumerated in SetupDi using the smart card reader class guid. But then I would need a unique attribute to be able to

Accessing javax.smartcardio from Linux 64 bits

我与影子孤独终老i 提交于 2019-11-29 22:22:50
I'm trying to load the smartcard terminals using the javax.smartcardio API with the following code: public CardTerminal getReadyCardTerminal() throws CardException { TerminalFactory factory = TerminalFactory.getDefault(); CardTerminals terminals = factory.terminals(); List<CardTerminal> list = terminals.list(State.CARD_PRESENT); while (list.isEmpty()) { terminals.waitForChange(1000); list = terminals.list(State.CARD_PRESENT); } CardTerminal cardTerminal = list.get(0); return cardTerminal; } ... and I always get the following exception: java.lang.IllegalStateException: no terminals at javax

How are PCSC smart card reader 'friendly names' constructed?

醉酒当歌 提交于 2019-11-29 17:08:20
I use WinSCard to list all readers, which gives me a list like this: ASK RDR4x7 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 1 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 2 Which is great, but I have no clue which name belongs to which card reader. Where do these names come from? How are they constructed? What I've found up until now: in the registry, there is a HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services key. Under this key, you can find the subkey which matches the card reader's "service" (which I found by

working with IC card reader and SLE5528 smart card

允我心安 提交于 2019-11-29 16:51:46
Am having an IC contact card reader and SLE5528 smart cards.Am wondering how to get started working with these items really. The reader is being read and i see no effect when i insert the smart card . i also installed the smart card shell of opensmart from http://www.openscdp.org/ but i can't get to read any card reader with it.Am wondering whether it has compatibility issues. Please i know i may have asked the question inappropriately, but am kindly asking anyone there to help me out on this. Any relevant links or helpful information to get me started and done will be of great help Thanks in