How to connect an external NFC card reader to your tablet

Now I have a tablet with Android 2.3.3 OS instead of an NFC phone, so I need to connect an external card reader to the tablet. Please tell me which card reader I should use, and any driver needs to connect a card reader to a tablet. Do the built-in NFC libraries support this reader or not? thanks in advance.

+7
source share
8 answers

I found the answer, ACS now provides an android library and an example application for its readers. You can find the library here , and some demos supported by android readers here .

The only problem is that the android ACS library only supports Android 3.1 and above. Hope this helps you.

If you still have a question, feel free to ask.

+9
source

The NFC built-in library in Android 2.3 and 4.0 only supports the NFC PN544 chip from NXP Semiconductors. I don’t think there are any card readers on the market, as this chip is specifically designed for use on mobile devices. You may be able to find alternative implementations of the NFC API for Android that support other NFC chips.

Another problem may be that your tablet most likely does not have the necessary NFC libraries installed, including the required system service (NfcManager). After all, your tablet does not support NFC, so it does not need these software components. Thus, for your tablet, you will need to create a new ROM image containing these software components.

Taking one of the many conventional desktop readers is probably not realistic. Creating all the necessary software for integration into Android is not a trivial task. It may be easier to buy an Android phone with NFC or wait if an Android tablet with NFC comes out.

+7
source

Neither Froyo 2.3 (min. SDK version supporting NFC) nor Ice Cream Sandwich 4.0 are compatible with a wide variety of chips.

When a manufacturer launches a new phone with a different NFC chip, it is because someone created drivers for using such chips and an interface with Android NFC classes, in particular, with the NfcManager class and the NfcAdapter class, which represents the local NFC adapter.

Best random scenario, you can use the Android NDK to create low-level C / C ++ classes to somehow exchange an external NFC card reader with Android, and then do more individual programming using the NDK to make the NfcAdapter on the SDK to detect him ... and there are no guarantees that you will succeed.

And ... if you are thinking of going to http://www.alibaba.com and importing a tablet with an NFC reader, think twice, because these may not allow you to do everything that the NXP Semiconductors chip does with Android Beam (TM), such as reading / writing and supporting various I / O operations with NFC-A, B, F, V or ISO-DEP.

In due time (and because nowadays time is the most valuable asset). I think your best option is to get a pair of NFC phones like Galaxy Nexus S, DROID Razr, Xperia S, HTC Incredible, etc ... they will work right out of the box, what we do.

+2
source

Hey Sahin, Since your device does not have NFC, it will not have NFC radio, and therefore it will not be able to connect (read or write) to the NFC card. According to the NFC lib, when you try to get the NFCAdapter, it will always return null. so for any experiment, you at least need an nfc enabled device.

In my project, we used the ACR122 smart card reader, which will connect to a computer without an Android device. This reader is used to read any nfc tag. An nfc-enabled Android device will act as an nfc tag in map emulation mode.

Now the next part of the question is "Support for NFC built-in libraries for this reader or not."

so that this card reader can read the value of the card.

+2
source

Using the ACS NFC reader, you can:

Here you can find documentation for libraries and sample code. However, he does not have the ability to record data. If you want to write to your NFC reader, use the transfer 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 transfer function. Full default NFC documentation 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 am right, it is always 0 if you use one reader / usbdevice.

command example:

 new byte[] command {(byte) WRITE, 0x04, 0x06, 0x0a, 0x00, 0x21} 

SECOND BYTE - PAGE DIRECTING TO A LETTER. Pages 4–15 are writable (pages 0 and 1 are identifiers, page 2 are locks, and page 3 is OTP, they are all READ ONLY).

The Read function works just like the WRITE function sends only 3 times 0x00 in the array for the correct read parameters:

 new byte[] command {(byte) READ, 0x04, 0x00, 0x00, 0x00} 

SECOND BYTE - PAGE TO READ.

+1
source

Is this video answered to your problem: http://www.youtube.com/watch?v=6Xe7Ux0cTuI "Low cost, simple, no drivers - EM4100 or Mifare RFID reader for iPad, Android and Windows"

PS: I do not work on this complexity and never try to solve them.

0
source

This is a good topic. I repeat RacZo about supporting the NFC library on Alibaba tablets. Since the NFC chipsets on the devices differ, and some of them are doubtful or do not support certain operations, you need to be careful and check your application on them in advance.

An 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 disadvantage of an external ACS device is the battery life. Since it monopolizes the USB port, and Android tablets will not allow charging via the USB port while a peripheral device is connected to it. Therefore, if your application is a kind of kiosk or self-service, this can be a problem.

Here is a good article about your various options when confronted with this problem. Without knowing more about your application, it is difficult to recommend anyway.

0
source

It's a bit late to answer here, but I actually tried to implement an external NFC reader as close as possible to my native NFC.

You can add an additional service, but normal NFC initialization (NfcAdapter, etc.) will not know about this service, so it will need to be initialized additionally.

As a result, it turned out to be impossible to replace or add the built-in NFC service on a spare disk - in the "drop-in-replacement-way" mode.

It is possible to reuse some native NFC classes such as Tag and IsoDep.

However, as a developer of an NFC application, you really do not want to use the same functionality from an external service as the built-in one. The external reader probably has more functionality, and at least you want to know if the reader is connected or not.

See the NFC External API for more information (note: this is not an open source product).

0
source

All Articles