nfc

Ionic 使用 NFC

独自空忆成欢 提交于 2020-01-14 16:20:42
Ionic 使用 NFC 哎哟喂,因为项目需要使用 Ionic 调用手机 NFC 功能,踩了好多坑,真的是,不过终于不负众望拿到了id。现在就记录一下我的步骤和踩过的坑! 步骤 我装的Ionic可能是最新的,然后用到的调用NFC的插件是 phonegap-nfc 。 首先就是正常的创建项目,对了,我用的Angular 。 给一下ionic官网是怎么说的,但是我觉得这个官网作用不大,但是还是贴一下吧 https://ionicframework.com/docs/v3/native/nfc/ 然后项目创建完成起来了之后去安装插件。 用下面两条命令安装插件: ionic cordova plugin add phonegap-nfc npm install @ionic-native/nfc 安装完成需要在项目里面注入依赖,首先是 app.module.ts 文件里面,引入插件 import {NFC, Ndef} from '@ionic-native/nfc/ngx'; 然后在 @NgModule 里面的 providers 里面加入 NFC 和 Ndef,就像这个样子: providers: [ ··· NFC, Ndef, ··· ], 然后在需要调用的页面里面引入插件,注入一下依赖: import {NFC, Ndef} from '@ionic-native/nfc/ngx

Android NFC <tech-list> - problem

时光怂恿深爱的人放手 提交于 2020-01-14 04:53:19
问题 id want to write my first NFC-application on android. For this i use the android developers link: http://developer.android.com/guide/topics/nfc/index.html Here for specifying the supported technologies you have to create a xml file like this: <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <tech-list> <tech>android.nfc.tech.IsoDep</tech> <tech>android.nfc.tech.NfcA</tech> <tech>android.nfc.tech.NfcB</tech> <tech>android.nfc.tech.NfcF</tech> <tech>android.nfc.tech.NfcV</tech>

Host Card Emulation Android 4.4

拈花ヽ惹草 提交于 2020-01-14 03:39:10
问题 Now that Android supports Card Emulation on the Nexus 5 with Android 4.4, is it likely that some apps may become available that allow me to effectively duplicate a smartcard (e.g. Smart Card that opens doors in my office) and use my phone in their place? Would be pretty handy. Cheers! 回答1: No, this is not likely. Typically, copying/cloning arbitary cards using Android HCE is not possible. Many access control systems use the card ID (UID) to identify the card (or even to make an access control

APDU Write block commands on mifare classic

℡╲_俬逩灬. 提交于 2020-01-13 20:27:53
问题 I have been trying to write some data to my mifare classic cards. first I send these two commands which returns 90 00: Load Mifare Keys: FF 82 20 01 06 FF FF FF FF FF FF Authenticate: FF 86 00 00 05 01 00 01 60 01 now I can write commands to sector 0 and block 1 + 2 ff d6 00 01 10 14 01 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 ff d6 00 02 10 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 i mistakenly overwritten block 3 a few times rendering this sector unreadable it seems: if I send the

APDU Write block commands on mifare classic

时光毁灭记忆、已成空白 提交于 2020-01-13 20:26:32
问题 I have been trying to write some data to my mifare classic cards. first I send these two commands which returns 90 00: Load Mifare Keys: FF 82 20 01 06 FF FF FF FF FF FF Authenticate: FF 86 00 00 05 01 00 01 60 01 now I can write commands to sector 0 and block 1 + 2 ff d6 00 01 10 14 01 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 ff d6 00 02 10 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 i mistakenly overwritten block 3 a few times rendering this sector unreadable it seems: if I send the

Send more than 261 bytes to Java Card with Android NFC

两盒软妹~` 提交于 2020-01-13 19:07:46
问题 I want to send an APDU with a length of 1699 bytes via NFC (class IsoDep ) to a Java Card smartcard. I get the error java.io.IOException: Transceive length exceeds supported maximum My phone is a Samsung Galaxy S7. I use extended-length in my applet on the card. I have verified that the card supports extended length. I tested this via pyapdutool by sending an APDU with 4000 bytes to the card. I found that when I write this code, the result is false : final Tag t = (Tag) tag; myTag = IsoDep

Android NFC : SNEP protocol and P2P response

空扰寡人 提交于 2020-01-13 09:35:08
问题 I am trying to implement a P2P communication between two Android phones (one of them will be replaced by an independent device in the end). I have seen that Android 4 supports SNEP which is published by the NFC forum and should be available on non-android devices. I have following the Google tutorial for NFC P2P (http://developer.android.com/guide/topics/nfc/nfc.html#p2p) and I can send some information from one phone to the other, but I have a few questions: Android Beam is just a name for

How to format an NFC tag in NDEF format

僤鯓⒐⒋嵵緔 提交于 2020-01-12 08:38:29
问题 I've a Mifare Classic1K NFC tag but I'm unable to write any content over it. Its writable but seems like it is not formatted in NDEF which is a pre-requisite for Android devices to be write data on it. Any suggestion is welcome. P.S: I do have a TRF7960 RF Antenna if that can help to format it. 回答1: Given an android.nfc.Tag object named tag , to format it, use: NdefFormatable formatable=NdefFormatable.get(tag); if (formatable != null) { try { formatable.connect(); try { formatable.format(msg)

Is it possible to implement a token queue in NFC cards?

这一生的挚爱 提交于 2020-01-12 07:23:10
问题 This question is specifically about MIFARE Ultralight C/EV1, or MIFARE DESFire EV1, or even NTAG cards. I want to implement a system of tokens, so that each time a normal user reads one of those cards they'll get one available token; that token will "pop out" from the NFC card they're reading. In other words, every time that NFC chip is read, it will issue a different usable token from the card's storage. Is this possible to implement? 回答1: Common non-programmable smart cards usually provide

Is it possible to access NFC API in HTML5 applications?

喜欢而已 提交于 2020-01-10 12:10:52
问题 I have a requirement to include NFC Card reader to read associate ID to authenticate the user for a web app displayed in a touch screen. Is it possible to use SCM NFC reader module for a web-based app. Is there any plugin that can we included in the client or server side for this purpose ? Thanks in advance. 回答1: The Web NFC API (maintained by the NFC Working Group is currently in draft status. This API is intended to provide access to NFC functionality for HTML5. BUT In its current version