`
weimou66
  • 浏览: 1249251 次
文章分类
社区版块
存档分类
最新评论

BlackBerry通过JSR177 API发APDU指令和SIM卡的applet进行沟通

 
阅读更多

BlackBerry可以通过JSR177 API发APDU指令和SIM卡的applet沟通,取得applet的信息。


JSR 177 API的Java类包javax.microedition.apdu ,属于J2ME的一个扩展API。

注意:BlackBerry手机应该是不直接支持JSR 257 API,而是提供了更强大的私有NFC API(a series of proprietory RIM APIs which givesimilarcapabilities to those found in JSR 257.)。参见最后面的黑莓官方资料。

黑莓手机上JSR 177例子代码如下

//The JSR177 connection will use the APDUConnection object

APDUConnectionapduConn = null;

//The connection string for the JSR177 connection

StringconStr = "apdu:0;target=41.5F.50.5F.44.5F.55.5F.41.70.71.01";

//Define the command to send to the Smart Card applet

byte[]command = { (byte) 0x00, (byte) 0x04, (byte) 0x00, (byte) 0x00 };

try
{

// Open a logical channel to the application

apduConn = (APDUConnection) Connector.open( conStr );

// Send an APDU and wait for a response

byte[] ret = apduConn.exchangeAPDU( command );

// Close the logical channel connection

apduConn.close();

}
catch( Exception e )
{

// handle the Exception

}



参考:

JavaCard应用程序开发教程之入门篇

北京华虹集成电路设计有限公司的论文:基于JSR177电信智能卡STK的研究与实现

http://www.docin.com/p-119731681.html


基于jsr177的移动业务安全方案及其应用

http://www.docin.com/p-133538566.html


BlackBerry上面使用JSR 177 API的资料:

http://supportforums.blackberry.com/t5/Java-Development/NFC-Primer-for-Developers/ta-p/1334857


JSR 177 APDU API from Sun

http://java.sun.com/javame/reference/apis/jsr177/javax/microedition/apdu/APDUConnection.html


其他资料:

http://blog.csdn.net/acstech/article/details/6534510

Java卡应用开发三部曲 pdf


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics