如何使用SCOSTA智能卡,创建MF,DF,EF以及写入/读取数据等...? [英] How to work with SCOSTA smart card, create MF, DF, EF and write/read data, ...etc?

查看:265
本文介绍了如何使用SCOSTA智能卡,创建MF,DF,EF以及写入/读取数据等...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ISO 7816智能卡编程领域的新手,我对非接触式编程有很好的了解,我拥有SCOSTA卡,我尽力读取/写入其上的数据,但始终会以错误6986响应我.

I am new to world of ISO 7816 smart-card programming, I have good knowledge about contactless programming, I have SCOSTA card and I tried my best to read/write data on it but always it response to me with Error 6986.

推荐答案

您首先需要在READ BINARY命令中选择一个文件或指定一个文件,然后才能从此类卡中读取数据.当前,您会收到一个异常,这意味着您尚未选择文件.存储卡通常具有单个接口和默认的选定文件,因此您可以直接发送读取命令.但是,基于文件的智能卡实现(例如SCOSTA)要求您首先选择文件,并且很可能首先要选择DF(目录).

You first need to select a file or indicate a file within the READ BINARY command before you can read data from these kind of cards. You currently get an exception that means that you haven't selected a file yet. Memory cards commonly have a single interface and a default selected file so you can directly send read commands. But a file based Smart Card implementation such as SCOSTA requires you to first select the file and - most likely - a DF (directory) first.

现在,应用程序目录是一个特殊的DF,也可以通过名称选择它.例如,护照申请的AID为A0000002471001,其中A000000247是ICAO的RID(对于应用程序提供者).因此,在护照上,您应该可以选择此目录.然后,您还需要选择一个文件,例如您可以通过将短文件标识符1D放入READ BINARY命令中来选择EF.SOD.

Now an application directory is a special DF that can also be selected by name. For instance, passport applications have an AID that is A0000002471001 where A000000247 is the RID (for application providers) of ICAO. So on passports you should be able to select this directory. Then you need to select a file as well, e.g. EF.SOD which you can select by putting the short file identifier 1D in the READ BINARY command.

存在哪些文件取决于应用程序/个性化设置.通常,没有通用的定义卡上内容的方法-从这个意义上讲,智能卡就像一台通用计算机.因此,您需要先找到要使用的协议规范.

Which files are present depends on the application / personalization. In general there is no universally established way of defining what is on a card - a smart card is just like a general purpose computer in that sense. So you need to find the specifications of the protocol you want to use first.

尚未个性化的卡可能还没有定义文件.

Cards that have not yet been personalized may well have no files defined yet.

这篇关于如何使用SCOSTA智能卡,创建MF,DF,EF以及写入/读取数据等...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆