How to Connect External NFC Card Reader to Tablet - android

Right now I am having Tablet having OS Android 2.3.3 instead of NFC phone,so I need to connect External card reader to tablet.Please tell me which card reader should I prefer and any driver needed to connect card reader to tablet.
The inbuilt NFC libraries support to that reader or not?
thanks in advance.

I found an answer,the ACS now provides android library and sample application for their readers.You can find library here and some information and video demo of android supported readers is here.
The only problem is that ACS android library supports only Android 3.1 and above.
hope it will help you.
If you still have question feel free to ask..

The built-in NFC library in Android 2.3 and 4.0 only supports the PN544 NFC chip by NXP Semiconductors. I don't think there are any card readers on the market that use it, as this chip is specifically designed for use in mobile devices. You may be able to find alternative implementations of the Android NFC API that support other NFC chips, though.
Another issue may be that your tablet most likely does not have the required NFC libraries installed, including the required system service (NfcManager). After all, your tablet has no NFC support, so it does not need these software components. So a new ROM system image would have to be created for your tablet that includes these software components.
Taking one of the many common desktop readers is probably not really feasible. Creating all the necessary software to integrate it into Android is not really a trivial task. It may be easier to just buy an Android phone with NFC or wait if an Android tablet with NFC comes out.

Neither Froyo 2.3 (min SDK version supporting NFC) or Ice Cream Sandwich 4.0 are compatible with a wide variety of chips.
When a manufacturer launch a new phone with a different NFC chip is because someone have created the drivers to use such chips and interface with Android's NFC classes, specifically the NfcManager class and the NfcAdapter class wich represents the local NFC adapter.
Best case scenario, you could use the Android NDK to create low level C/C++ classes to communicate somehow the External NFC Card reader with Android and then make more custom programming with the NDK to make the NfcAdapter on the SDK to detect it... and there are no warranties that you'll succeed.
And... if you are thinking about going to http://www.alibaba.com and import a tablet with NFC reader, think twice, because that ones might not allow you to do all what the NXP Semiconductors chip does with Android Beam (TM) such as Read/Write and support different I/O operations with NFC-A, B, F, V or ISO-DEP.
For your time's sake (and because time is the most valuable asset for anyone these days). I think your best option is to get a couple of NFC Phones such as the Galaxy Nexus S, DROID Razr, Xperia S, HTC Incredible, etc... those will work right out of the box, that's what we are doing.

Hey sachin,
Since your device doesn't have NFC, it won't have the NFC radio and hence it can not connect (Read or write) to an NFC card. According to the NFC lib, when ever you try to get NFCAdapter it will always return null.
so you atleast need an nfc enabled android device for any experiment.
In my project, we used ACR122 smart card reader that will be connect to a pc not android device.This reader is used to read any nfc tag. An nfc enabled android device will act as a nfc tag in card emulation mode.
Now next part of question "The inbuilt NFC libraries support to that reader or not".
so this card reader can read card value.

With a ACS NFC reader is it possible:
Here can you find the documentation for the libraries and example code. However it doesn't seem to have an option to write data. If you want to write to your NFC reader use the transmit function to send byte arrays.
private static final byte READ = (byte) 0x30;
private static final byte WRITE = (byte) 0xA2;
These bytes are the default read and write bytes for the transmit function. The full documentation of the default NFC protocol can be found here
example:
byte[] response = new byte[300];
int responseLength;
try {
responseLength = mReader.transmit(slotNum, command, command.length, response, response.length);
} catch (ReaderException e) {
e.printStackTrace();
return "executeCommand: error: " + e.getMessage();
}
Slotnum is the number of the reader you want to use. If I'm correct this is always 0 if you are using one reader/usbdevice.
example command:
new byte[] command {(byte) WRITE, 0x04, 0x06, 0x0a, 0x00, 0x21}
THE SECOND BYTE IS THE PAGE ADRES TO WRITE TO. Page 4 - 15 are writable (page 0 and 1 are the id, page 2 are lockbytes and page 3 are OTP. all of them are READ ONLY).
The Read function works the same as the WRITE function only send 3 times a 0x00 in the array for the correct read settings:
new byte[] command {(byte) READ, 0x04, 0x00, 0x00, 0x00}
THE SECOND BYTE IS THE PAGE ADRES TO READ.

Is this video answers to your problem : http://www.youtube.com/watch?v=6Xe7Ux0cTuI
"Low cost , Simple , No driver - EM4100 or Mifare RFID reader for Ipad , Android and Windows"
PS: I doesn't work to this compagny and never try their solution.

This is a good topic. I echo RacZo's concerns about NFC library support in the Alibaba sourced tablets. Since NFC chipsets in devices vary and some have dubious or no support for certain operations, you need to be careful and test out your app on those beforehand.
The ACS reader can be a cost effective solution, and there are some mature and well supported libraries and SDKs that support its integration with Android. The downside of the ACS external reader is battery life. Because it monopolizes the the USB port, and Android tablets won't allow charging through a USB port while a peripheral is connected to it. So if your application is some kind of kiosk or self serve app, this may be a problem.
There is a good post here about your various options when faced with this challenge. Without knowing more about your application it's tough to recommend one way or another.

A little late to answer here, but I've actually tried to implement an external NFC reader as close to native NFC as possible.
It is possible to add an additional service, but the regular NFC initialization (NfcAdapter etc) will not be aware of this service, so it will have to be initialized in addition.
The result was that it is not technically possible to replace or add the built-in NFC service on a stock ROM - in a 'drop-in-replacement-way'.
Reusing some of the native NFC classes like Tag and IsoDep is possible.
However as a developer of an NFC app, you really do not want the same functionality from the external service as the built-in. The external reader probably has more functionality and at a very minimum you want to know whether the reader is plugged in or not.
See External NFC API for additional information (note: it is not a fully open source product).

Related

Why Android & IOS11 cannot communicate via NFC

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.

Android NFC with USB-NFC-Reader

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)

Looking for some guidance on NFC codes and or NDEF

I have an ACR122 NFC reader that I'm connecting to an Android device via USB. The Android device is running ICS and doesn't have native NFC functionality.
The SDK that comes with the ACR122 comes with a sample app that is fairly dense and very sparsely documented, however, I can see that they are sending messages as APDU hex arrays. I'm new to this, so am somewhat unclear on how these commands actually work and in what circumstances.
Meanwhile, it would appear that there's now something called NDEF, which abstracts the APDU and allows for a much less confusing message exchange (at least as per this tutorial) however, that's only available on NFC enabled devices (or so it would appear)... I'm hoping there's some way to leverage it with the ACR122.
So, my question is:
Does anyone know if I can utilize NDEF with the ACR122's SDK? I'm not trying to do anything complicated, I just want to read and write to the tags.
If I am not mistaken, NFC classes are part of the ICS SDK, but will always return that no NFC is available.
For the ACR 122, my experience is purely through NFC Tools for Java, it might very well contain some interesting parts which can be ported to Android. It also has its own NDEF parse/serialize part.
For an alternative NDEF parse/serialize library, see here

Reading RFID with Android phones [closed]

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.

Android Application send tag to contacless reader ISO 14443 A or B device

Can everyone know how to build android nfc application which can send some information to reader device ISO 14443 A / B?
Thanks
P2P is possible. The most challenging is to find out the right libraries/SDK and the commercial quality reader. So far we have tried already 3 open-source solutions (nfclib, ISMB, etc.) and none of them is really ready for commercial system roll-out.Now we have ordered 2 other NFC readers and SDKs - we waiting for them to be delivered for them to test them:(
Also the problem is the phone side - so far we have tested 5 NFC Android phones and each of them is behaving differently... For us the best will be reader that emulates NFC tags or MIFARE chips...
Petr

Categories

Resources