[英]Problems with SLE4428 smart card
I have EZ100PU usb smart card reader and new (clear) SLE4428 smart cards. 我有EZ100PU USB智能卡读卡器和新的(透明的)SLE4428智能卡。 I would like to write number sequence on them.
我想在上面写数字顺序。 I'm trying to do it with simple java application.
我正在尝试使用简单的Java应用程序来实现。 That's my code based on others available on the internet:
那是我基于互联网上其他代码的代码:
public class Connection {
public static void main(String[] args) throws Exception {
TerminalFactory factory = TerminalFactory.getDefault();
CardTerminal terminal = terminals.get(1);
System.out.println("terminal: " + terminal.getName());
Card card = terminal.connect("*");
System.out.println("card: " + card);
CardChannel channel = card.getBasicChannel();
System.out.println("channel: " + channel.getChannelNumber());
System.out.println("protocol: "+card.getProtocol());
byte b[]=card.getATR().getBytes();
for(int i=0;i<b.length;i++)
System.out.print(b[i]);
// byte[] bytes = {(byte)0xFF, (byte)0x00, (byte)0xFF, (byte)0x00};
// ResponseAPDU r = channel.transmit(new CommandAPDU(bytes));
card.disconnect(false);
}
}
I have problem, because I always get "Unknown protocol 16" when card is inside reader. 我有问题,因为当卡在读卡器内部时,我始终会收到“未知协议16”。 Probably because of that I can't write anything on the card, if I try I always get error.
可能因为这个原因,如果我尝试我总是会出错,那么我就无法在卡上写任何东西。 Can you help me?
你能帮助我吗?
You are trying to use a method of connecting to ISO 7816-3 (T=0, T=1 or T=CL) compatible processor cards to connect to a lowly memory card. 您正在尝试使用一种连接到ISO 7816-3(T = 0,T = 1或T = CL)兼容的处理器卡的方法来连接一个低容量的存储卡。 You will likely have to use a card specific reader library instead, you cannot just use
javax.smartcardio
. 您可能不得不使用特定于卡的读卡器库,而不能仅使用
javax.smartcardio
。
Your SLE 4428 card has default PIN = FFFF. 您的SLE 4428卡的默认PIN = FFFF。 First you need to verify PIN USING below COMMAND :- FF 20 00 00 02 FFFF Then you can write data to SLE 4428 card.
首先,您需要在命令下方验证PIN使用:-FF 20 00 00 02 FFFF然后可以将数据写入SLE 4428卡。 If data is "My name is Kashyap" then in hex it is 4D79206E616D65206973204B617368796170.
如果数据是“我的名字是Kashyap”,则十六进制为4D79206E616D65206973204B617368796170。 Write Data:- FF D0 00 20 12 4D79206E616D65206973204B617368796170.
写数据:-FF D0 00 20 12 4D79206E616D65206973204B617368796170。 You can also change default PIN.
您也可以更改默认PIN。 Suppose I want to chagne PIN to 1234 from FFFF then use below Command:- FF D0 03 FD 03 FF 1234.
假设我想将FF的PIN码更改为1234,然后使用以下命令:-FF D0 03 FD 03 FF 1234。
To read data below command:- FF B0 00 20 12 要通过以下命令读取数据:-FF B0 00 20 12
Thanks, Kashyap 谢谢,Kashyap
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.