ACR122 USB SDK - JNI 调用 Winscard.dll

发布于 2024-11-11 14:42:29 字数 319 浏览 8 评论 0原文

我们购买了 ACR122 USB SDK 用于 NFC 测试。我们想要为 ACR122U-A2 NFC 读卡器构建测试桌面应用程序。我们正在 Microsoft Windows 7 平台上用 Java 开发它。

我们预计,为了从 Winscard.dll 使用 PC/SC,我们需要进行 JNI 调用。为了做到这一点,应该准备 JNI 调用的 C/C++ 包装器库。

我认为这应该是 SDK 的一部分,因为示例应用程序引用了 JNI 包装器 Jacspcsc.dll,但该库不在那里。有人有类似经历吗?是否有可用于 Winscard.dll 的 JNI 包装器?

谢谢 斯坦恩

we have bought the ACR122 USB SDK for NFC testing. We would like to build the test desktop application for the ACR122U-A2 NFC reader. We are developing it in Java on the Microsoft Windows 7 platform.

We expected that in order to use PC/SC from Winscard.dll we need to make JNI calls. In order to do that C/C++ wrapper library for JNI calls should be prepared.

I think this should be part of the SDK, because the example application references the JNI wrapper Jacspcsc.dll, but the library is not there. Has anybody similar experience? Are there any JNI wrappers available for Winscard.dll?

Thanks
STeN

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

友谊不毕业 2024-11-18 14:42:29

如果您为读卡器安装了 PC/SC 驱动程序,则可以使用 java smardcardio 包 (http://download.oracle.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/package -summary.html)与读者交流。

TerminalFactory terminalFactory = TerminalFactory.getDefault();
CardTerminal terminal = terminalFactory.terminals().list().get(0);
Card card = terminal.connect("T=0");
CardChannel channel = card.getBasicChannel();

// Construct a command and transmit it
CommandAPDU command = new CommandAPDU(new byte[]{(byte)0x01, (byte)0x02, ...})
ResponseAPDU response = channel.transmit(command)

If you installed the PC/SC driver for the reader you can use the java smardcardio package (http://download.oracle.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/package-summary.html) to communicate with the reader.

TerminalFactory terminalFactory = TerminalFactory.getDefault();
CardTerminal terminal = terminalFactory.terminals().list().get(0);
Card card = terminal.connect("T=0");
CardChannel channel = card.getBasicChannel();

// Construct a command and transmit it
CommandAPDU command = new CommandAPDU(new byte[]{(byte)0x01, (byte)0x02, ...})
ResponseAPDU response = channel.transmit(command)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文