登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 电子信息类 > 通信工程 > 正文

Android手机上基于软件的NFC卡模拟方式的设计与实现毕业论文

 2021-09-15 01:09  

摘 要

基于主机的NFC卡模拟技术,属于NFC三种主要应用模式中的一种。在此种模式下,NFC设备被模拟成一张实体卡用于日常消费与身份辨识。NFC卡模拟技术从实现方式上细分,主要有基于硬件的卡模拟和基于软件的卡模拟,基于软件的卡模拟又被称为基于主机的卡模拟(HCE)。相比较基于硬件的卡模拟技术,基于主机的卡模拟技术无需SE(安全模块),从而终结了电信运营商和服务提供商之间对安全模块的争夺,因此被认为是很有前景的技术,但同时也存在着安全性上的隐患。

对HCE技术的NFC应用,本次设计首先分析了其市场需求和技术上的可能性,并确定了应用界面布局的设计方式以线性布局和相对布局为主。接着查阅资料,分析读卡机和卡模拟机之间的通信过程,结合阅读Android 4.4系统的API,确定设计APP的总体思路与方向。最后,从Android 4.4的API中选择能够实现本次设计的公共类,通过改写Java文件实现数据传输,改写XML文件完成界面设计,改写AndroidManifest文件完成系统配置。调试成功后进行实际通信性能测试,测试的结果表明读卡机与考模拟机之间能够进行正常通信,但还存在着功能不够完善、兼容性不强等问题,最后针对这些问题指出了改进的方向。

关键词:NFC;HCE;通行过程;软件设计

Abstract

Host-based card emulation belongs to one of the three main patterns of NFC application. Below the pattern, the NFC device is emulated as a card entity for daily consumption and identification. The technology of NFC card emulation can be categorized according to implementation into two kinds: the hardware-based card emulation and the host-based card emulation. Compared with the hardware-based card emulation, HCE requires no secure elements and then finishes the contest between telecom operators and service providers on control power of the secure elements. Based on this, it is recognized as the most hopeful technology. However, there exists potential safety hazard as well.

On this paper, we analyze the market demand and the possibility in technology of the HCE application and make the layout of application interface clear, where the linearlayout and relativelayout play the main role. Then I refer to some relative materials and make an analysis on the process of the communication between the card reader and the card emulator. Combining it with the API of Android 4.4 version, I make sure the whole line of thought of this APP. Finally, I select the useful public classes from Android 4.4 version to accomplish the design from the aspects of rewriting the Java files to transfer data, XML files to design the interface and AndroidManifest files to configure the system. After debugging, the factual communication performance is tested. Results show that the card-emulation device could communicate with the card reader properly, but problems like the low compatibility and uncompleted function exist. Towards these problems, the direction of revising is found out at last.

Keywords: NFC; HCE; Communication process; Software design

目 录

第1章 绪论 1

1.1 研究背景及意义 1

1.2 国内外研究现状 1

1.3 研究内容 2

第2章 读卡机与卡模拟机的通信原理 4

2.1 读卡机与基于SE的卡模拟机通信 4

2.1.1 通信过程 4

2.1.2 基于SE的卡模拟解决方案 4

2.2 读卡机与基于主机的卡模拟的通信 5

2.2.1 通信过程 5

2.2.2 通信协议 6

第3章 Android系统基于主机的NFC卡模拟总体设计 7

3.1 需求分析 7

3.1.1 功能需求 7

3.1.2 用户体验需求 7

3.2 可行性分析 8

3.2.1 市场接受度 8

3.2.2 技术可行性 8

3.3 应用界面设计 9

3.3.1 Android应用界面风格 9

3.3.2 界面设计常用控件 10

第4章 Android系统基于主机的NFC卡模拟的开发 11

4.1 开发环境搭建 11

4.1.1 环境变量配置 11

4.1.2 Android SDK的搭建 12

4.2 软件系统的开发与实现 14

4.2.1 改写UI文件 14

4.2.2 改写Java文件 19

4.2.3 改写AndroidManifest.xml文件 27

第5章 功能测试、完善与问题 29

5.1 安装包的生成与安装 29

5.2 CR95HF Development Software的安装与运行 31

5.3 功能测试 34

5.3.1 标签检测 34

5.3.2登录信息及通讯信息显示 35

5.4 存在的问题及完善建议 37

第6章 总结与展望 39

参考文献 40

致谢 41

第1章 绪论

1.1 研究背景及意义

随着互联网的完善和智能手机的普及、计算机和通信技术的发展,手机的用途早己不仅仅是通话,它成为了集通话、娱乐、查询、支付等众多功能于一身的智能终端。其中,手机支付功能更是成为当下潮流的研究内容。原本需要使用现金付款的场合,现在仅仅利用手机就可以完成交易,手机已经逐渐成为一种身份的标签。NFC技术是这一领域当前最为热门的应用之一。它提供便捷、高效的解决方案,方便用户进行简单直观的信息交换。

NFC,全称近距离无线通信技术,由飞利浦公司与索尼公司联合开发。它是以非接触式射频识别技术(RFID)为基础,可以在20cm的范围内进行设备数据交换的技术。NFC是一种极富竞争力的无线通信技术,一方面,它充分符合高速度、低价格、低功率、兼容性强等近距离无线互连设备所应有的特点;另一方面,和传统近场通信技术相比,又具备天然的安全性。Android作为主流的手机系统之一,从2.3版本就开始支持NFC,这也使得基于Android系统开发NFC应用变得方便。

NFC设备主要支持两种工作模式——主动通讯模式及和被动通讯模式。根据应用类型的不同,又可分为读卡器模式、点对点模式以及卡模拟模式。在卡模拟模式中,终端被模拟为一张非接触卡,如健身卡、公交卡、银行卡,完成支付账单、交通购物的功能。实际应用中,卡模拟设备可被读卡器读取其信息,完成交互功能。目前有两种方式可以实现NFC卡模拟功能:一种基于硬件,通常又称为虚拟卡模式(Virtual Card Mode);一种基于软件,通常称为主机卡模式(Host Card Mode)。虚拟卡模式下,整个系统的安全运行需要设备提供安全模块SE(Secure Element),以确保个人隐私信息存储和交易的安全执行环境。主机卡模式下,SE的功能被手机中的一个应用或云端的服务器取代,此时NFC芯片接收到的数据或由操作系统发送至应用,或是通过通讯网络发送至云端服务器完成交互。这两种方式有一个共同的特点,即绕过对手机内置SE的要求[[1]][[2]]。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图