Currently using React Native and attempting to use react-native-nfc-ios and react-native-nfc so I can have cross-device communication between ios and Android. I'm finding that they cannot communicate, however I think it's due to a broader issue (as other existing apps also don't work).
If I download a NFC reader app on iPhone 7, and an NFC writer app on Android they cannot communicate. Why is this?
Instructions to Duplicate
Turn on NFC Reader on iPhone 7
Put some arbitrary data in NFC write mode on Android
Bringing devices together has no effect.
Not understanding the intricacies of NFC, it's hard for me as a casual programmer to understand what the actual problem is.
I understand that IOS11 on iPhone 7 (plus) supports NFC read, and generally speaking there are card emulation, peer to peer, and read write modes.
Should they not communicate? The iPhone is not able to pick up the
Android writer. Why is this?
How does card emulation (I assume to be Apple Pay), differ from a write mode?
The reason is because Apple's iOS 11 update only allows reading from NFC tags (writing is only permitted for Apple Pay). At the moment, their software does not share the same enjoyment afforded by Android phones which enable card emulation, peer-to-peer, and reader/writer NFC usage. So our only hope is to wait for a software update that will finally enable this existing feature for developers to use.
Related
I want to find out if this is possible, to have a web app read off information from a Mifare card, by tapping the card against a NFC-enabled Android device.
I have been searching this for quite some time, and it seems like as of now it's only limited to experimental implementation - https://whatwebcando.today/nfc.html
Or am I truly better off with a native Android app?
Edit:
Thanks to all who replied. We have been trying out the Web NFC API as specified here https://w3c.github.io/web-nfc/, turned on the experimental features of Chrome on the Android device, but it always return a null value when we tap the Mifare card on the device. Are we missing out any steps, or is it really a technical limitation of the API at this moment, since it's still not considered as a stable specification?
I think on mid-term even WebNFC will be restricted to (reading & writing) NDEF messages, similar to what Apple is currently doing on iOS.
So if you want to read info like UID or raw data out of a MIFARE card, you need to write a native app. Be aware that MIFARE (Classic) is not supported by all phones, even when they have NFC.
If you want to use a framework like ionic or Cordova, you can also use the NDEF plugin (https://github.com/chariotsolutions/phonegap-nfc)
I have an Android tablet with Android 4.2. This tablet does not have NFC hardware. However I have an external USB reader: ACR 1252U, that came with an Android library. This library unfortunately only gives me basic functionality - read and write Tags. Altough this is working quite well, it is not enough...
Because for my application I need to transfer files from my Android 4.2 tablet to other NFC devices (Android smartphones). So I need to put the NFC reader into peer-to-peer mode - which it supports. But how can I achive this with my setup? There indeed is an SDK for that reader, but it's Windows only.
Is it somehow possible, to use the built-in NFC-functions from Android with the external USB reader?
Is there another library for this reader, that supports peer-to-peer communication with other NFC-devices?
Is there another Hardware that I can use, to make this work?
Edit:
The linked question does NOT solve my problem:
It is 3.5 years old. On might think, that in meantime has changed a lot.
The answer to that question (= use the Android ACS library), is part of my own question... So it can't be the answer.
Is it somehow possible, to use the built-in NFC-functions from Android with the external USB reader?
No, that's not possible. If your Android devices did not ship with NFC, there simply is no built-in NFC functionality (not even on the software side). The Android NFC API is essentially an empty stub implementation that does nothing on such a device.
Is there another library for this reader, that supports peer-to-peer communication with other NFC-devices?
The library from ACS does not prevent you from accessing the reader's peer-to-peer capabilities, so I don't see why you would want to use a different library. See section 5.9 of the API specification on how to use the reader's peer-to-peer capabilities.
I need to transfer files from my Android 4.2 tablet to other Android NFC devices
Based on that request I assume that you want to use something like Android Beam to establish some fast out-of-band channel over NFC and then transfer the (large?) files over that out-of-band channel (e.g. WiFi or Bluetooth).
In that case, you would need to re-implement the Android Beam stack (NFC peer-to-peer mode + LLCP + Simple NDEF Exchange Protocol + establishing out-of-band communication channel + transfering file over that channel)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I did enough research on reading RFID tags using Android phones(smart phones).
My understanding of this is that for NFC-enabled smart phones (Nexus S) it is possible to read RFID tags, but there are restrictions.
For non-NFC-enabled Androids we need a RFID reader to which we can communicate from Android using Bluetooth.
My question is:
What are the SDK which we use for reading RFID tag from Android Phone(NFC enabled)?
If I have to read using Non NFC enabled phone, is there any standard reader available who provides SDK for development purpose?
NFC enabled phones can ONLY read NFC and passive high frequency RFID (HF-RFID). These must be read at an extremely close range, typically a few centimeters. For longer range or any other type of RFID/active RFID, you must use an external reader for handling them with mobile devices.
You can get some decent readers from a lot of manufacturers by simply searching on google. There are a lot of plug in ones for all device types.
I deal a lot with HID readers capable of close proximity scans of HID enabled ID cards as well as NFC from smart phones and smart cards. I use SerialIO badge readers that I load a decryption profile onto that allows our secure company cards to be read and utilized by an application I built. They are great for large scale reliable bluetooth scanning. Because they are bluetooth, they work for PC/Android/iOS/Linux. The only problem is, HID readers are very expensive and are meant for enterprise use. Ours cost about $400 each, but again, they read HID, SmartCards, NFC, and RFID.
If this is a personal project, I suggest just using the phone and purchasing some HF-RFID tags. The tag manufacturer should have an SDK for you to use to connect to
and manage the tags. You can also just use androids NFC docs to get started https://developer.android.com/guide/topics/connectivity/nfc/. Most android phones from the last 8 years have NFC, only iPhone 6 and newer apple phones have NFC, but only iOS 11 and newer will work for what you want to do.
You can hijack your Android audio port using an Arduino board like this. Then, you have two options (as far as I'm concerned):
1) Buy another Arduino Shield that supports RFID. I haven't seen one that supports UHF so far.
2) Try to connect your Arduino hijack with a USB RFID reader and build some embedded hardware kit.
Right now, I'm working in the second option but with iPhone.
First is understanding that RFID is very generic term. NFC is subset of RFID technology. NFC is used for prox card, credit cards, tap and go payment system. Your phones can read and emulate NFC (Apple pay, Google pay, etc.), if they support NFC. NFC is very short distance and low power - which is why you see tap and go type usage.
The more common RFID are the tags you see here and there. They come in a wide ranges of styles, uses and frequency.
HF - high frequency tags are what they use for "chipping" animals - cattle, dogs, cats. Read range is about 12 inches and requires an external antenna that is powered the bigger the antenna the more power it needs and the further it can read.
UFH tags look similar to HF tags but have a read range of several feet.
Also HF tags come single read and multi read.
UFH is exclusviely multi read.
Mutiread means when a reader is active, you can litterally read about 1700 tags in under 10 seconds.
But this is a function of the size of the antenna and how much power you can push through the reader.
As to the direct question about Android and RFID - the best way to go is to get an external handheld reader that connects to your mobile device via Bluetooth.
Bluetooth libraries exist for all mobile devices - Android, Apple, Windows.
From there its just a matter of the manufacturer documentation about how to open a socket to the reader and how to decode the serial information.
The TSL line of readers is very popular because you don't have to deal with reading bytes and all that low level serial jazz that other manufactures do. They have a nice set of commands that are easy to use to control the reader.
Other manufactures are basic in that you open a serial socket and then read the output like you would see in terminal app like PuTTY.
I recently worked on a project to read the RFID tags.
The project used the Devices from manufacturers like Zebra (we were using RFD8500 ) & TSL.
More devices are from Motorola & other vendors as well!
We have to use the native SDK api's provided by the manufacturer, how it works is by pairing the device by the Bluetooth of the phones and so the data transfer between both devices take place! The programming is based on subscribe pattern where the scan should be read by the device trigger(hardware trigger) or soft trigger (from the application).
The Tag read gives us the tagId & the RSSI which is the distance factor from the RFID tags!
This is the sample app:
We get all the device paired to our Android/iOS phones :
You can use a simple, low-cost USB port reader like this test connects directly to your Android device; it has a utility app and an SDK you can use for app development:
https://www.atlasrfidstore.com/sls-rfid-smartmicro-android-micro-usb-reader/
A UHF RFID reader option for both Android and iOS is available from a company called U Grok It.
It is just UHF, which is "non-NFC enabled Android", if that's what you meant. My apologies if you meant an NFC reader for Android devices that don't have an NFC reader built-in.
Their reader has a range up to 7 meters (~21 feet). It connects via the audio port, not bluetooth, which has the advantage of pairing instantly, securely, and with way less of a power draw.
They have a free native SDK for Android, iOS, Cordova, and Xamarin, as well as an Android keyboard wedge.
The NFC-enable able to read a NFC tag ,if the android smartphone with our NFC , you have to buy a small NFC reader for your phone. it is rfid reader for mobile phones.
I'd like to implement a NFC communication between my Android app and a NFC-enabled kiosk. I've read the documentation and I understand pushing data can be done in 2 ways:
Via foreground NDEF pushing for API level 10 to 13
Via Android Beam from API level 14
I think I can do what I want to via the first solution but I'd like to know if it's possible to use Android Beam between an android device and a non-android device?
Thanks for your help,
Romain
Although the function calls between API 10 to 13 and APi 14 differ, the actual underlying protocol is nearly the same. In both cases, NFC peer-to-peer communication is done using LLCP. In API 10 to 13, the actual data transfer protocol used is NPP. In API 14, SNEP is added to that, but it will fall back to NPP when the other device does not support SNEP.
So when your non-Android device implements SNEP and/or NPP over LLCP, it can transfer data to and receive data from an Android NFC device. Several implementations of SNEP and LLCP for card reader devices exist, see for example https://github.com/grundid/nfctools.
I looked in to this for a college project.
First please not that there are 3 modes of NFC operation { Card read/write, tag emulation and P2P communication }. Android supports Card read/write and P2P communication.
To communicate with a non Android device via P2P is quite complex as you must use the NPP (Ndef Push Protocol) built on LLCP (logical link control protocol). Your non android platform will need to implement the LLCP to be able to communicate. I'm not sure if this has been done for NFC yet. Information on the NPP/LLCP implementation can be found here
The next approach is to use card read/write mode to communicate with the non Android device running in card emulation mode. This way you can send APDU's to the emulated tag to send and receive data. I did this approach in reverse using BlackBerry for my project. BlackBerry supports card emulation so I used the non Android device (ACR122U) to send APDU's to the BlackBerry.
While the first approach (P2P) is obviously the ideal way to go, the second one could be easier to implement. It worked quite well for me in my application anyway, I created a system that accepts payments via NFC.
Please note that the ACR122U doesn't have good support for NFC Tag Emulation so it is not suitable for you. The LibNFC website is a great start to find a device that supports tag emulation.
I am now finished the project and it works great using the ACR122U device. If you need any help on the second approach please ask.
See belows
Issue 28014: Enable real NFC p2p communication and the option to disable the "Touch to Beam" UI
https://code.google.com/p/android/issues/detail?id=28014
Android Peer to Peer dose not work at all.
I´ve been reading a lot about NFC, card emulation and etc.... I found two very helpful posts about this issue:
Android and Symbian NFC mobile development questions and answers (FAQ)
http://forum.xda-developers.com/showthread.php?t=1281946
Reading them I realized that it is quite complicated to write an application to make a payment.
Since I just want to see "something" working I'd like to ask the more experienced people if using the patch provided at xda-developers forum (second link above) would be enough just to write an appication that would open some door ou register/authorize someone´s entrance at an event (provided that I have a NFC device to properly interact with my phone, of course).
Thank you all
Payment is mostly impossible since you don't have the keys for the JavaCard card manager, better forget about it. Additionally, to write a Visa, etc compatible payment applet, you
need access to their specs, which means signing NDAs, paying money, etc.
Apparently the Mifare chip has stock keys, so you can modify it. So if you have a reader, and a device (door, etc.) that uses Mifare cards, you might be able to get it work. The thread also mentions that you might be able to clone your transport card. But:
you need to build your own firmware and flash it on a rooted phone
you may need to port the patches to whatever is the current GB version (2.3.7) or use exactly the same (old) tag
You need to do a lot more reading :)
In my opinion, you shouldn't bother with trying the patches on XDA Developers, especially if you are considering using Android 4.0 ICS. Android 4.0 already has built-in functionality on the Nexus S and Galaxy Nexus phones to enable card emulation. Drawback: you need a rooted phone to make it all work (see e.g. How to obtain NFCEE_ADMIN permission on rooted phone? for an example of someone succeeding).
A perhaps simpler approach is using NFC peer-to-peer communication ("Android Beam") with an external reader. This can work with any Android NFC device using a simple app to push the necessary data to the reader. Provided the reader support peer-to-peer communication, this is far the easiest solution. It would require some development work on the reader side, though, see http://code.google.com/p/ismb-npp-java/wiki/NppFromPhoneToACR122 for an example of this approach.