winscard

Cannot authenticate NTAG213

亡梦爱人 提交于 2021-02-07 04:12:57
问题 I am using an ACR122U NFC reader to password protect an NTAG213 NFC label. I think I have managed to set the password correctly, but I cannot authenticate and change the label afterward. My code for authenticating looks like this: #include <winscard.h> #include <iostream> #pragma comment(lib, "winscard.lib") const char *ReaderName = "ACS ACR122 0"; unsigned Password = 0x12345678; int main() { //Establish context SCARDCONTEXT hContext; DWORD SCard_Status1 = SCardEstablishContext(SCARD_SCOPE

Cannot authenticate NTAG213

一个人想着一个人 提交于 2021-02-07 04:05:33
问题 I am using an ACR122U NFC reader to password protect an NTAG213 NFC label. I think I have managed to set the password correctly, but I cannot authenticate and change the label afterward. My code for authenticating looks like this: #include <winscard.h> #include <iostream> #pragma comment(lib, "winscard.lib") const char *ReaderName = "ACS ACR122 0"; unsigned Password = 0x12345678; int main() { //Establish context SCARDCONTEXT hContext; DWORD SCard_Status1 = SCardEstablishContext(SCARD_SCOPE

ISO 15693: OMNIKEY Contactless reader, occasional read failure

流过昼夜 提交于 2019-12-25 06:45:49
问题 I am investigating an intermittent issue where reading eight blocks of data from a TI Tag HF-I RFID card from an HID OMNIKEY contactless reader. The ReadEightBlocks routine below is called 8 times from a for loop that bumps startBlockNum up by 8 each time. Reading all 64 data blocks on the card with 8 reads of 8 blocks. ReadEightBlocks calls SmartCardTransmit() that in turn calls SCardTransmit() . However, reading the second 8 blocks occasionally fails with an error code of 0x6A 0x82 . Can

JNA and Winscard: Reading attributes (SCardGetAttrib) without card

房东的猫 提交于 2019-12-24 14:22:08
问题 I have problems to read out reader attributes (like SCARD_ATTR_VENDOR_IFD_SERIAL_NO), without a card present on the reader though setting the parameter dwShareMode of the function SCardConnect to SCARD_SHARE_DIRECT. What is going wrong? This is the Code: NativeLong res; IntBuffer b = IntBuffer.allocate(1024); NativeLongByReference phContext = new NativeLongByReference(); LongByReference phCard = new LongByReference(); res = Winscard.INSTANCE.SCardEstablishContext(SCARD_SCOPE_USER, null, null,

Contact-less card through an OmniKey, how to get “UID”?

青春壹個敷衍的年華 提交于 2019-12-18 11:34:41
问题 I am trying to read information off of a smartcard, using a contact-less OmniKey 5321 card reader. Edit : Added a bounty. I'm writing a C# 3 in .NET 3.5 program, so this is a Windows application. The card has some information stamped onto it, that I would assume, in some way, is present in the card data (there is a photo of the card and reader below.) The card has the following information stamped onto it: 1* 00447 21091328-32 When using the Diagnostics application that comes with the OmniKey

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

谁都会走 提交于 2019-12-18 09:11:58
问题 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.

How to use SCardGetStatusChange correctly on Windows 8?

混江龙づ霸主 提交于 2019-12-07 12:12:59
问题 The smart card service behaves differently on Windows 8 and MSDN hasn't updated their documentation. Can anyone give a code snippet on how to call SCardGetStatusChange correctly to monitor smart card actions on Windows 8? Thanks in advance! 回答1: Here is a C++ template function that I wrote for a personal blog project. It uses a library I am developing that is up on github, but you can also just rework the logic into your own context. template<typename SetContext, typename ClearContext,

Get mifare card serial number with WinSCard library

梦想与她 提交于 2019-12-06 11:56:36
问题 I am working on an application that required reading the mifare card serial number, the language I am working with is C#. I am new to mifare reader programming, so I am sorry for asking dumb question. At first I would like to know if there is a different between Mifare UID and Mifare Serial number. I have managed to get UID with the help of WinSCard library, but I cant figure it out how to get the card serial number which should be 10 digit numbers. I do appreciate if you could point me to

How to connect to Smart Card Reader based on its USB port location?

陌路散爱 提交于 2019-12-05 22:07:47
I'm currently doing some research and testing on multiple smart card reader identification to determine which reader is connected to which USB port. Lets say that I plug in Reader A into USB port 1. By invoking SCardListReaders function, I retrieve the following friendly name: ACS ACR1281 1S Dual Reader PICC 0 Then I plug in another reader (Reader B) into USB port 2. Now I have 2 readers connected to the same PC. Invoking SCardListReaders will give me: ACS ACR1281 1S Dual Reader PICC 0 ACS ACR1281 1S Dual Reader PICC 1 I'm aware of how these names are generated ( How are PCSC smart card reader

Smartcard reader naming

倾然丶 夕夏残阳落幕 提交于 2019-12-05 05:27:06
问题 I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function) reader 1 - "Smart Card Reader 0 " reader 2 - "Smart Card Reader 1 " In my program is set up that "Smart Card Reader 0 " - action 1 "Smart Card Reader 1 " - action 2 but sometimes (without rebooting, perhaps lost contact) reader 1 gets name "Smart Card Reader 1 " reader 2 gets name "Smart Card Reader 0 " and the program does not do what users need. I use SCardGetStatusChange (requires the name of the