我正在为我的论文开发一个原型。我正在使用ACR122u读写器,通过APDU命令将数据传送到android手机(HTC One M7)。在我应用上一个补丁(6.09.401.5)之前,ACR122u正在检测智能手机,但在那之后它就停止了
之前我刚在智能手机上激活了近场通信,ACR122u会从红色变成绿色,表示检测到了近场通信。
请寻找一些指导
关于问候
发布于 2015-03-24 22:53:43
可能由于更新而禁用了“自动PICC轮询”,或者在PICC轮询期间忽略了特定的标记类型。您可以尝试使用访问ACR提供的ACR122U读卡器的程序或使用以下程序,将PICC操作参数重置为默认值(0xFF)。
public class ResetReader {
public static final int FILE_DEVICE_SMARTCARD = 0x310000;
public static final int IOCTL_CCID_ESCAPE_SCARD_CTL_CODE =
FILE_DEVICE_SMARTCARD + 3500 * 4;
public static void main(String[] args) throws Exception {
// the following loop lists all connected card terminals
TerminalFactory factory = TerminalFactory.getDefault();
for (CardTerminal term : factory.terminals().list()) {
System.out.println(term.getName());
}
// connect to the ACR122U by choosing the correct name
CardTerminal terminal = factory.terminals().getTerminal("ACS ACR122 0");
Card c = terminal.connect("DIRECT");
c.transmitControlCommand(IOCTL_CCID_ESCAPE_SCARD_CTL_CODE,
new byte[]{(byte)0xFF, 0x00, 0x51, (byte)0xFF, 0x00});
}
}https://stackoverflow.com/questions/25710740
复制相似问题