具有固定卡 ID 的基于主机的卡仿真 [英] Host-based Card Emulation with Fixed Card ID

查看:29
本文介绍了具有固定卡 ID 的基于主机的卡仿真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 4.4 引入了基于主机的卡模拟 (HCE).如您所知,所有 NFC 卡都带有固定的卡 ID (NfcAdapter.EXTRA_ID).

Android 4.4 introduced Host-based Card Emulation (HCE). As you know, all NFC cards come with a fixed card ID (NfcAdapter.EXTRA_ID).

我的办公室门禁通常会检测 NFC 卡 ID 以进行授权.将我的手机刷入 KitKat 后,我​​尝试使用访问阅读器扫描我的手机.但是每当屏幕关闭并再次打开时,我都会得到一个不同的卡 ID.

My office door access usually detects the NFC card ID for the authorization. After flashing my phone to KitKat, I tried to scan my phone with the access reader. But whenever the screen turns off and on again, I get a different card ID.

我确实尝试保持电话屏幕开启,并将模拟卡 ID 注册到门禁系统.它设法授予打开门的权限.但这在屏幕关闭并再次打开后不起作用.

I did try keeping the phone screen on, and registering the emulated card ID to the door access system. It managed to grant the access to open the door. But this won't work after the screen turns off and on again.

自从 KitKat 引入 HCE 模式以来,我一直在尝试使用手机模拟我的门禁卡.

Ever since KitKat introduced HCE mode, I have been trying to emulate my door access card using my phone.

修复手机模拟卡 ID 有什么想法吗?

Any ideas for making the phone emulated card ID fixed?

推荐答案

这(至少在官方 API 中)是不可能的:

This is (at least with the official API) not possible:

在交换的第一部分,HCE 设备将显示其 UID;应假定 HCE 设备具有随机 UID.这意味着在每次点击时,呈现给阅读器的 UID 将是随机生成的 UID.因此,NFC 阅读器不应依赖 HCE 设备的 UID 作为身份验证或识别形式.

In the first part of the exchange the HCE device will present its UID; HCE devices should be assumed to have a random UID. This means that on every tap, the UID that is presented to the reader will be a randomly generated UID. Because of this, NFC readers should not depend on the UID of HCE devices as a form of authentication or identification.

(http://developer.android.com/guide/topics/connectivity/nfc/hce.html#ProtocolParams)

这篇关于具有固定卡 ID 的基于主机的卡仿真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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