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

本文详细介绍了如何使用JSR177API在BlackBerry手机上与SIM卡applet进行交互,通过提供具体的代码示例,展示了如何建立连接、发送APDU指令以及接收响应的过程。此外,文章还引用了多个相关资源,为开发者提供了深入学习和实践的路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 give similar capabilities 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.youkuaiyun.com/acstech/article/details/6534510

Java卡应用开发三部曲 pdf


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值