Android Mini PC MK802 RFID programming using external reader - android

this is my very first post on stackoverflow, I need to read a RFID tag using an external RFID reader, because I have to use android on MK802 via USB port. My concern is in using two packages android.nfc and android.nfc.tech, because I dont' know if I can use them. Do I need to read from USB or from RFID sensor?

You typically can't use the android.nfc.* packages for such a scenario. Android's NFC API is intended for NFC interfaces and not for RFID readers. Even if you do have an NFC interface device connected to your Android device through USB, you would need to provide the hardware abstraction layer to connect your NFC interface device to Android's NFC stack and compile that into your Android system.
Depending on how your RFID reader works, the reader's manufacturer might provide an API for Android (unlikely) or will be able to provide you with specifications on how to interface their device (this could be possibe through ANdroid's USB API but it could also be as simple as receiving keyboard inputs).

Related

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)

Read NFC cards with ACR 1252u on Android

We have a ACR 1252u NFC card reader. We want to read/write NFC cards on Android with this device. The problem is that this device is not seen as a NFC device but as a USB device instead. Therefore native Android NFC can not be used. Currently we are able to detect the device and to trigger an event by adding or removing a card. But we are neither able to read nor to write a card. In the documentation we found some HEX codes that are transmitted to the device, but we did not figure out how they work in order to read/write cards. Also on the net we found some example codes using other ACR devices but obviously they are not compatible to our one.
I am looking for any working examples in order to get the ACR1252u reading/writing NFC cards on Android.
The reader is a USB CCID (chip card interface device, see http://www.usb.org/developers/docs/devclass_docs/) device. Hence, you need to implement the PC/SC abstraction layer (see http://www.pcscworkgroup.com/specifications/overview.php) or use some ready-made library in order to send smartcard commands to that reader.

Transfer data to PC from android device via NFC

I am trying to develop an Android application for a hospital. In this system there is a need to get the patient information stored in the database in the android phone into the desktop computer using NFC technology. Is there anyway where I could use a NFC USB Reading device (ACR122U NFC Smart Card Reader RFID Writer 5 Mifare USB) to transfer the data from the mobile phone to my desktop computer?
The real scenario for this would be, in a hospital when a person wants to take some test results he will reach to the counter and place the mobile device on the NFC reader device installed at the counter when this is done all the details about the patient should be transferred to the desktop machine at the counter.
I don't want to transfer a lot of information if there is any way in which I could transfer the patient id stored in the mobile database into the desktop using NFC that would be enough.
Depending on what NFC devices you want to use in combination with the ACR122U NFC reader you multiple options:
If you only need to exchange a single message (data packet) in a single direction, you could use peer-to-peer mode. However, the peer-to-peer protocol stack is relatively complex (in comparison to the other alternatives). Moreover, Android's built in Beam functionality will request user confirmation (Beam UI) for every message transfer.
If you only need to support Android devices with Android 4.4 or later (and even then not all Android NFC devices are supported, see this), you could use the ACR122U in reader/writer mode. In reader/writer mode, the ACR122U can communicate with contactless smartcards. See the reader's manual on how to access such ISO/IEC 14443-4 contactless smartcards. On the Android side, you would use the host-based card emulation (HCE) mode. See the Android documentation on how that works on Android 4.4 and later.
In my opinion the best option would be to use the ACR122U in card emulation mode. In card emulation mode the ACR122U can be used to emulate a tag/contactless smartcard that can be detected by an Android device just like any other NFC tag/contactless smartcard. You can find examples, for instance, with libnfc. Also see this answer on how to bring the ACR122U into card emulation mode. This option can be used across all Android versions (and on BlackBerry and with some additional effort to some extent even on Windows Phone). With this scenario, the phone would take the reader (interrogator) part in the communication and the ACR122U (and the connected PC) would be the card (controlled component). Using techniques like inverse reader mode you could reverse that relationship.
You could use the host based card emulation for exchanging the data: http://developer.android.com/guide/topics/connectivity/nfc/hce.html
Or alternatively the p2p communication:
http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#p2p

communication between RFID (epc) tags and devices that have BLE

Is there a way to create communication between devices (phones) that have bluetooth 4.0 and different RFID tags like EPS tags on products, without using extra hardware?
I search for an API that allows to use devices that have BLE (like the last android and apple phone) to scan products RFID tags and get information from them.
I know that bluetooth 4.0 uses RFID so I think that this kind of API exists, but I couldn't find it.
Also, if you used any API like this and you have the experience, please write some pros and cons, because I also search for the best that exists.
thanks very much!
Completely different wireless technology.
tl;dr
No
Bluetooth is an active transfer wireless socket protocol, and RFID is a short wave IDentification system, they do not operate on the same frequency.
I am unsure what hardware the newest iWare has, but many new Android phones have an RFID / Contactless Smart Card devices built into them, in addition to one for BLE.

Is it possible to use Android Beam between an android device and another NFC device?

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.

Categories

Resources