SCR3310v2.0和SLE5528读/写?

发布于 2024-11-27 04:05:24 字数 70 浏览 1 评论 0原文

我有SCR3310v2.0读卡器和芯片卡SLE5528,有没有代码示例可以记录和读取卡信息,或者有没有免费软件可以做到这一点?

I have SCR3310v2.0 reader and chip card SLE5528, There are any code samples to be able to record and read the card information, or is there are any free software who do it?

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

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

发布评论

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

评论(1

违心° 2024-12-04 04:05:24

我使用的是 ACR38,所以可能有点不同。

如果您刚刚开始使用智能卡,您应该坚决获得一些 SDK(这基本上就是您所要求的)。

至于SLE5528:
该卡非常基础,有 3 个命令您需要了解。

1)读取,可以随时使用此命令(只要您已连接)。使用 ACR38,我将发送以下命令:

FF B2 MSB LSB Length

这是一个 APDU命令,第一个字节名为CLA,第二个字节为INS。这两个通常用于描述命令(也许总是)。那么就有P1P2,这两个字节通常用来描述卡上的地址或命令的范围。最后一个是Lc,在这种情况下(也许总是)它代表要读取的字节数。这些之后的任何字节都是命令可能需要的数据字节。

请注意,由于这个行业非常疯狂,一些制造商可能会使用不同的命令。如果我没记错的话,我使用的手册在 INS 中指定了 B0,但在 SDK 演示代码中他们使用了 B2,这也是唯一有效的。

2)验证PSC,如果您打算使用写入命令,则必须先使用此命令。 (每节一次)。

FF 20 00 00 02 PSC1 PSC2

通常默认的 PSC 代码是 FF FF。

3)写入,与卡验证后可以执行此命令写入数据:

FF D0 MSB LSB Length DATA1 DATA2 DATA3 and so on.....

如果我想更改PSC代码,我所要做的就是将其三个字节写入地址03 FD 。请注意,实际的验证码只有两个字节,但由于某种原因,我总是需要将第一个字节写为 FF,然后写出我想要验证的实际两个字节。我相信这背后有一些原因,我只是不知道它是什么。

因此,要编写一个简单的程序,首先从地址 A4 03 读取 14 个字节。然后使用默认 PSC 代码与卡进行验证。最后将PSC代码修改为A2 B2;我们将这样做:

<< FF B2 A4 03 0E
>> FF FF FF FF FF FF FF FF FF FF FF FF FF FF 90 00
<< FF 20 00 00 02 FF FF
>> FF FF FF 90 00
<< FF D0 03 FD 03 FF A2 B2
>> FF A2 B2 90 00

请注意,读取器总是会返回两个额外的字节,以达到我们期望的。这两个字节称为SW代码(或状态代码)。 90 00 表示一切都好。您可以在此处找到有关每个返回代码含义的参考资料,

这是我正在使用的读者的手册:
http://www.acs.com.hk/drivers/eng/PMA_ACR38x.pdf

如果可以,请使用 java 因为它们具有用于使用智能卡的内置函数,否则。你可以像我一样使用 Windows 的 WinSCard API。

I'm using ACR38 so it may be a little different.

If you just started with smartcards, you should defiantly get some SDK (which is basically what you're asking for).

As for the SLE5528:
The card is really basic, there are 3 commands which you want to be aware of.

1)Read, can use this command anytime (as long as you're connected). with the ACR38, I will send this command:

FF B2 MSB LSB Length

This is an APDU command, the first byte named CLA and the second is INS. these two are usually used to describe the command (maybe always). then you have P1 and P2, these two bytes are usually used to describe the address on the card or the range of the command. the last one is Lc, in that case (maybe always) it represents the number of bytes to read. any byte after these, is a data byte which a command may require.

Note that because this industry is so wild, some manufacturers may use different commands. If I remember correctly, the manual I used specified B0 in the INS but in the SDK demo code they used B2 which also was the only thing that worked.

2)Verify PSC, you must use this command first if you plan to use the write command. (once for each session).

FF 20 00 00 02 PSC1 PSC2

Usually the default PSC code is FF FF.

3)Write, after verifying with the card you can execute this command to write data:

FF D0 MSB LSB Length DATA1 DATA2 DATA3 and so on.....

If I wanted to change the PSC code, all I had to do is to write it's three byte into the address 03 FD. note that the actual verification code is only two bytes, but for some reason I always need to write the first byte as FF and then the actual two bytes which I want to verify with. I believe that there is some reason behind this, I just don't know what it is.

So, to write a simple program which first reads 14 bytes from address A4 03. then verify with the card using the default PSC code. and at last changes the PSC code to A2 B2; we will do this:

<< FF B2 A4 03 0E
>> FF FF FF FF FF FF FF FF FF FF FF FF FF FF 90 00
<< FF 20 00 00 02 FF FF
>> FF FF FF 90 00
<< FF D0 03 FD 03 FF A2 B2
>> FF A2 B2 90 00

Note that the reader will always return two additional bytes to what we're expecting. these two bytes called the SW code (or the status code). 90 00 means all good. you can find references for the meaning of each return code

here is the manual for the reader that I'm working with:
http://www.acs.com.hk/drivers/eng/PMA_ACR38x.pdf

If you can, use java as they have built in functions for working with smart cards, otherwise. you can do what I did and work with the WinSCard API of windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文